summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-04-20 12:00:50 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-20 12:00:50 +0530
commit8660bb2bef59c00df194087ed75ba81f34555a73 (patch)
tree85bdc64ee47ecca0949500749c13302a31e7b6e5
parent3b8f7ed4c080dc45da02dc751478863007199c26 (diff)
afr-transaction: handle double flushes
__if_fd_pre_op_done - reset fd_ctx->pre_op_done to 0 so that double flushes do not result in two xattrop() calls
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index 9baba79b9dd..d779bacc38a 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -209,8 +209,10 @@ __if_fd_pre_op_done (xlator_t *this, fd_t *fd)
fd_ctx = (afr_fd_ctx_t *)(long) ctx;
- if (fd_ctx->pre_op_done)
+ if (fd_ctx->pre_op_done) {
+ fd_ctx->pre_op_done = 0;
op_ret = 1;
+ }
}
out:
UNLOCK (&fd->lock);