summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-03-12 14:22:01 +0530
committerAnand Avati <avati@redhat.com>2012-03-12 13:06:14 -0700
commit6a8fcff3fb6955162dc4eeaeaa627bb31311627e (patch)
tree36b280b684ce42d855514097cb73e0ff67cf3c0c /xlators
parent2056df6f5e9ae7ccc6bb1b8f0b036f206b218999 (diff)
features/quota: store quota context even for the cases where loc.name
is NULL with name-less lookups, loc.name is NULL. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Change-Id: Ie3914924896c90a7fb7251cb0184c8e561ef7f4f BUG: 801364 Reviewed-on: http://review.gluster.com/2917 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/quota/src/quota.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 844a0981dd8..753882f0d7c 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -596,9 +596,6 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unwind;
}
- if (local->loc.name == NULL)
- goto unwind;
-
ret = quota_inode_ctx_get (local->loc.inode, local->limit, this, dict,
buf, &ctx, 1);
if ((ret == -1) || (ctx == NULL)) {
@@ -632,6 +629,9 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unlock;
}
+ if (local->loc.name == NULL)
+ goto unlock;
+
list_for_each_entry (dentry, &ctx->parents, next) {
if ((strcmp (dentry->name, local->loc.name) == 0) &&
(uuid_compare (local->loc.parent->gfid,