From c8f39bea04c6021243d1ab2bcea450a0f067aabc Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 15 Oct 2009 19:36:47 +0000 Subject: locks: keep ref on the inode while locks are held keeping refs on the inode while there are held locks prevents the inode from getting pruned away Signed-off-by: Anand V. Avati 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 --- xlators/features/locks/src/internal.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/features/locks/src/internal.c') diff --git a/xlators/features/locks/src/internal.c b/xlators/features/locks/src/internal.c index 1c1220931..487826587 100644 --- a/xlators/features/locks/src/internal.c +++ b/xlators/features/locks/src/internal.c @@ -191,6 +191,7 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, op_ret = 0; unwind: + pl_update_refkeeper (this, loc->inode); STACK_UNWIND (frame, op_ret, op_errno); out: return 0; @@ -293,6 +294,7 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, op_ret = 0; unwind: + pl_update_refkeeper (this, fd->inode); STACK_UNWIND (frame, op_ret, op_errno); out: return 0; @@ -782,6 +784,7 @@ pl_entrylk (call_frame_t *frame, xlator_t *this, op_ret = 0; out: + pl_update_refkeeper (this, loc->inode); if (unwind) { STACK_UNWIND (frame, op_ret, op_errno); } @@ -888,6 +891,7 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this, op_ret = 0; out: + pl_update_refkeeper (this, fd->inode); if (unwind) { STACK_UNWIND (frame, op_ret, op_errno); } -- cgit