diff options
author | Amar Tumballi <amar@gluster.com> | 2011-04-12 05:00:18 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-12 21:49:56 -0700 |
commit | 6a2c2fa4f13f9ed96098c4fec40f747e171e6819 (patch) | |
tree | fff285e3591b71b81cbbf5a5982e5ae140821bca /xlators/protocol | |
parent | 59b9ab45a01d52e197ab6f76fd71e64910396d57 (diff) |
protocol/client: fix the fd_count decrement logic
the error creeped in during some code cleanup and logging enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 1761 (incorrect self-heal behaviour when files are deleted)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1761
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 418307c41..1ba128b94 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -459,6 +459,8 @@ client3_1_reopen_cbk (struct rpc_req *req, struct iovec *iov, int count, } pthread_mutex_unlock (&conf->lock); + ret = 0; + attempt_lock_recovery = _gf_false; /* temporarily */ if (attempt_lock_recovery) { @@ -471,11 +473,10 @@ client3_1_reopen_cbk (struct rpc_req *req, struct iovec *iov, int count, "need to attempt lock recovery on %"PRIu64 " open fds", fd_count); } + } else { + fd_count = decrement_reopen_fd_count (frame->this, conf); } - out: - if (!attempt_lock_recovery) - fd_count = decrement_reopen_fd_count (frame->this, conf); if (fdctx) client_fdctx_destroy (frame->this, fdctx); @@ -558,6 +559,7 @@ client3_1_reopendir_cbk (struct rpc_req *req, struct iovec *iov, int count, } pthread_mutex_unlock (&conf->lock); + decrement_reopen_fd_count (frame->this, conf); ret = 0; out: |