From 9f71b25f34a24741496875ab947f6f9c95ec277f Mon Sep 17 00:00:00 2001 From: vmallika Date: Wed, 11 Mar 2015 18:03:47 +0530 Subject: syncop: assign lk_owner for the newly created frame syncop_inodelk doesn't work properly as lk_owner is not set in the frame created by 'synctask_create'. There is a possibility that more than one thread can acquire inode lock with syncop_inodelk Change-Id: I8193edb0d24b3a6e3a3f6a0c5d7ab5a1be8e7daf BUG: 1188636 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/9858 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Vijay Bellur --- libglusterfs/src/syncop.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libglusterfs/src/syncop.c') diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index 1b968d5164a..9df462321aa 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -467,6 +467,8 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk, newtask->frame = frame; if (!frame) { newtask->opframe = create_frame (this, this->ctx->pool); + set_lk_owner_from_ptr (&newtask->opframe->root->lk_owner, + newtask->opframe->root); } else { newtask->opframe = copy_frame (frame); } -- cgit