diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2013-05-10 10:09:13 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-05-16 20:47:03 -0700 |
commit | 2acc8c1f04d0376bedf36f1f746e542422344fa6 (patch) | |
tree | 83fb83cd59743769698fbea8a08133a722d40bbe /xlators/cluster | |
parent | 5780e274c78aab671e5fb72d66fec23f90576e51 (diff) |
cluster/dht: Don't do extra unref in dht-migration checks
Problem:
syncop_open used to perform a ref in syncop_open_cbk so the extra
unref was needed but now syncop_open_cbk does not take a ref so no
need to do extra unref.
Fix:
remove the extra fd_unref and let dht_local_wipe do the final unref.
Change-Id: Ibe8f9a678d456a0c7bff175306068b5cd297ecc4
BUG: 961615
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4974
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index e91352c4ccb..52a24acc22a 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -802,13 +802,10 @@ dht_migration_complete_check_task (void *data) ret = 0; /* 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 */ + required.. delete the ctx */ ret = fd_ctx_del (local->fd, this, NULL); - if (!ret) { - fd_unref (local->fd); - ret = 0; + if (!ret) goto out; - } /* perform open as root:root. There is window between linkfile * creation(root:root) and setattr with the correct uid/gid |