summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-10-06 18:16:49 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-10-07 22:12:33 -0700
commit303ae214dc533eb1fa6b9e834ee32f3b0d657a37 (patch)
treeb7847c8905d4ec1d000302175541681d89462a7e /xlators/features/quota
parent1b1f063371a66748101ba90bafe08317dee50c4d (diff)
quota: use copy_frame when creating new frame during quota_check_limit
This is a backport of http://review.gluster.org/#/c/12265/ 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 <vmallika@redhat.com> Change-Id: Ieeaf23b10120a1e426ab1440a20e7f8dd8794ac0 BUG: 1265623 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12266 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/quota')
-rw-r--r--xlators/features/quota/src/quota.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index bd022ea..3b803a0 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -1373,7 +1373,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;
@@ -1381,7 +1381,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;