1 From 2b789331dc933b186360fc8cbffb06289ee60ee9 Mon Sep 17 00:00:00 2001
2 From: Vijay Bellur <vbellur@redhat.com>
3 Date: Tue, 10 Jun 2014 22:21:28 +0530
4 Subject: [PATCH 1/3] cluster/dht: Don't do extra unref in dht-migration checks
7 syncop_open used to perform a ref in syncop_open_cbk so the extra
8 unref was needed but now syncop_open_cbk does not take a ref so no
9 need to do extra unref.
12 remove the extra fd_unref and let dht_local_wipe do the final unref.
14 Change-Id: Ibe8f9a678d456a0c7bff175306068b5cd297ecc4
16 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
17 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
18 Reviewed-on: http://review.gluster.org/8029
19 Tested-by: Gluster Build System <jenkins@build.gluster.com>
20 Tested-by: Joe Julian <joe@julianfamily.org>
21 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
23 xlators/cluster/dht/src/dht-helper.c | 7 ++-----
24 1 file changed, 2 insertions(+), 5 deletions(-)
26 diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
27 index ef29e3f..dd8dc49 100644
28 --- a/xlators/cluster/dht/src/dht-helper.c
29 +++ b/xlators/cluster/dht/src/dht-helper.c
30 @@ -802,13 +802,10 @@ dht_migration_complete_check_task (void *data)
33 /* once we detect the migration complete, the fd-ctx is no more
34 - required.. delete the ctx, and do one extra 'fd_unref' for open fd */
35 + required.. delete the ctx */
36 ret = fd_ctx_del (local->fd, this, NULL);
38 - fd_unref (local->fd);
44 /* perform open as root:root. There is window between linkfile
45 * creation(root:root) and setattr with the correct uid/gid