From 4cd60d5456c2ff0fe0455c8d1d534776bb8269c4 Mon Sep 17 00:00:00 2001 From: vmallika Date: Tue, 7 Jul 2015 16:03:26 +0530 Subject: quota/marker: set lk_owner when taking lock on parent in rename This is a backport of http://review.gluster.org/#/c/11561/ Before doing a rename operation marker takes inode lock on the file parent, here lk_owner is NULL and this can cause accounting problem with multiple rename on the same directory This patch fix the problem by setting lk_owner > Change-Id: Ibb789e39b2833e425d0a5fca85282ff1465206cb > BUG: 1240598 > Signed-off-by: vmallika Change-Id: Ibd3abaee2dd5d132906a79a518fbcedcdefc4552 BUG: 1241487 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/11601 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Raghavendra G --- xlators/features/marker/src/marker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators') diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 414177aa6c5..c7c9fd38c1a 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1598,6 +1598,9 @@ marker_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, local->xdata = dict_ref (xdata); + if (is_lk_owner_null (&frame->root->lk_owner)) + set_lk_owner_from_ptr (&frame->root->lk_owner, frame->root); + STACK_WIND (frame, marker_rename_inodelk_cbk, FIRST_CHILD(this), -- cgit