summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-01-04 05:34:37 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-01-09 10:11:52 -0800
commite700afa8ebbb345657a8351e00814a7bdd8b3dff (patch)
tree3930d36fe660e7fbb408a6012be3c3f1dcbfa7cd
parent7e1ba386dd51aebe3fb05b5d7b3d9ff42e3fb77a (diff)
storage/posix: prevent double close of fds resulting in EBADF errors.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
-rw-r--r--xlators/storage/posix/src/posix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 450c6b5..340d71b 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -1074,6 +1074,8 @@ posix_unlink (call_frame_t *frame, xlator_t *this,
close (fd);
else
inode_ctx_put (loc->inode, this, (uint64_t) fd);
+
+ fd = -1;
}
fail:
if (fd != -1)