From 6a8fcff3fb6955162dc4eeaeaa627bb31311627e Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Mon, 12 Mar 2012 14:22:01 +0530 Subject: 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 Change-Id: Ie3914924896c90a7fb7251cb0184c8e561ef7f4f BUG: 801364 Reviewed-on: http://review.gluster.com/2917 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- xlators/features/quota/src/quota.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators') 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, -- cgit