diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2018-05-03 09:34:39 +0530 |
---|---|---|
committer | N Balachandran <nbalacha@redhat.com> | 2018-05-03 11:00:12 +0000 |
commit | 86a0a7e562f4f1c2f5e68c10a917aeaf1d984365 (patch) | |
tree | e71e0bff7f2a25345005180cfc428f63a02a65b6 | |
parent | 112048652ab00d9650053396c1b28a49d1853783 (diff) |
cluster/dht: unwind if dht_selfheal_dir_mkdir returns an error
If dht_selfheal_dir_mkdir returns an error, cbk passed to
dht_selfheal_directory is not invoked. So, Current codepath leaves an
unwound frame resulting in a hung fop forever.
Change-Id: I422308b8a34a074301ca46b029ffe676f5e0f66c
fixes: bz#1574305
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index d3163fd1cfc..49540a04c9e 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -2343,7 +2343,11 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk, local->heal_layout = _gf_false; } - dht_selfheal_dir_mkdir (frame, loc, layout, 0); + ret = dht_selfheal_dir_mkdir (frame, loc, layout, 0); + if (ret < 0) { + ret = 0; + goto sorry_no_fix; + } return 0; |