From ff5ea98c6c0ffb7398562b418e8e9c422f08691d Mon Sep 17 00:00:00 2001 From: vmallika Date: Tue, 6 Oct 2015 18:16:49 +0530 Subject: quota: use copy_frame when creating new frame during quota_check_limit DHT re-balance, sets frame root PID < 0 and quota_check_limit skips enforcement if this PID is less than 0. When creating new frame for quota_check_limit we need to use copy_frame instead of create_frame, so that all auth information are copied from original frame. Change-Id: Ib3b4a3744f8b0d72a8bc32826f6edae836d6faed BUG: 1267812 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/12265 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Raghavendra G --- xlators/features/quota/src/quota.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 1a8aa87a2f6..03c4a69fe68 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -1371,7 +1371,7 @@ do_quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this, if (parent == NULL) goto out; - new_frame = create_frame (this, this->ctx->pool); + new_frame = copy_frame (frame); if (new_frame == NULL) goto out; @@ -1379,7 +1379,6 @@ do_quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this, if (new_local == NULL) goto out; - new_frame->root->uid = new_frame->root->gid = 0; new_frame->local = new_local; new_local->par_frame = frame; -- cgit