diff options
author | vmallika <vmallika@redhat.com> | 2015-03-11 18:03:47 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-14 20:18:04 -0700 |
commit | 9f71b25f34a24741496875ab947f6f9c95ec277f (patch) | |
tree | be94a876aa4aedf923eb89e54374f38f2e3866ce /libglusterfs/src/syncop.c | |
parent | 7c177bda6ccd1c3e7a7c070eb2ab0dc5e6b32a5c (diff) |
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 <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/9858
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r-- | libglusterfs/src/syncop.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |