summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-08-26 13:31:23 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-27 02:14:57 -0700
commitfc8b3fcbe1ab7fa8a7b15437d49df287856f2e95 (patch)
tree7580e9375dcc666ed5b4d7dc1b9c36c021c4eaa5
parent7fc38ce7783891218a0cb83d233d579e64831e33 (diff)
cluster/afr: Hold ref on the right fd
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1365 ([3.1.0qa5-15] Self-heal doesn't happen from 1st subvolume to others) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1365
-rw-r--r--xlators/cluster/afr/src/afr-open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index c8603be33ac..dc830f7d59d 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -440,6 +440,7 @@ out:
gf_log (this->name, GF_LOG_TRACE,
"The up/down flush is over");
+ fd_unref (local->fd);
local->up_down_flush_cbk (frame, this);
return 0;
@@ -460,7 +461,7 @@ afr_up_down_flush (call_frame_t *frame, xlator_t *this, fd_t *fd,
local->op = GF_FOP_FLUSH;
- local->fd = fd_ref (local->fd);
+ local->fd = fd_ref (fd);
local->transaction.fop = afr_up_down_flush_wind;
local->transaction.done = afr_up_down_flush_done;