From e75be8977ede9b9174d20b39c427e6fb4ccde567 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 24 Mar 2014 22:54:03 +0530 Subject: cluster/afr: Remove eager-lock stub on finodelk failure Problem: For write fops afr's transaction eager-lock init adds transactions that can share eager-lock to fdctx list. But if eager-lock finodelk fop fails the stub remains in the list. This could later lead to corruption of the list and lead to infinite loop on the list leading to a mount hang. Fix: Remove the stub when finodelk fails. Change-Id: I0ed4bc6b62f26c5e891c1181a6871ee6e4f4f5fd BUG: 1063190 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/6944 Tested-by: Gluster Build System Reviewed-by: Ravishankar N Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-transaction.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'xlators/cluster/afr/src/afr-transaction.c') diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index f974fdb59..205ff759e 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1544,7 +1544,7 @@ afr_delayed_changelog_wake_up (xlator_t *this, fd_t *fd) } - int +int afr_transaction_resume (call_frame_t *frame, xlator_t *this) { afr_local_t *local = NULL; @@ -1555,11 +1555,7 @@ afr_transaction_resume (call_frame_t *frame, xlator_t *this) /* We don't need to retain "local" in the fd list anymore, writes to all subvols are finished by now */ - LOCK (&local->fd->lock); - { - list_del_init (&local->transaction.eager_locked); - } - UNLOCK (&local->fd->lock); + afr_remove_eager_lock_stub (local); } afr_restore_lk_owner (frame); -- cgit