diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2013-06-04 06:08:24 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-06-08 14:56:08 -0700 |
commit | bb0bbfecd609fff1a3890775b3119a552aba0e18 (patch) | |
tree | 25be42a3af105ab6292c84111541b9b6853adb61 /xlators/cluster/dht/src/dht-helper.c | |
parent | 0f741cec5f031dc1c6e1b96e0f5c35d0f374af4d (diff) |
Fix crash in dht_migration_complete_check_task because of NULL fd
This is a backport of Ia5a5d40bcea7bfb320ef7096af1e035b8847d4ff
BUG: 960055
Change-Id: Ibf3547a775d7ca2f3a097c880cdf38ffafb322da
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/5139
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 9a00fe648..ef29e3f3a 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -799,6 +799,8 @@ dht_migration_complete_check_task (void *data) local->cached_subvol = dst_node; ret = 0; + if (!local->fd) + goto out; /* once we detect the migration complete, the fd-ctx is no more required.. delete the ctx, and do one extra 'fd_unref' for open fd */ ret = fd_ctx_del (local->fd, this, NULL); |