summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c12
-rw-r--r--xlators/features/marker/src/marker-quota.c5
2 files changed, 13 insertions, 4 deletions
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index 4fb0bb4b3..af5fed132 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -159,8 +159,16 @@ __mq_add_new_contribution_node (xlator_t *this, quota_inode_ctx_t *ctx, loc_t *l
int32_t ret = 0;
inode_contribution_t *contribution = NULL;
- if (!loc->parent)
- goto out;
+ if (!loc->parent) {
+ if (!uuid_is_null (loc->pargfid))
+ loc->parent = inode_find (loc->inode->table,
+ loc->pargfid);
+ if (!loc->parent)
+ loc->parent = inode_parent (loc->inode, loc->pargfid,
+ loc->name);
+ if (!loc->parent)
+ goto out;
+ }
list_for_each_entry (contribution, &ctx->contribution_head, contri_list) {
if (loc->parent &&
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 193bdb1c9..6f9af6e13 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -2034,8 +2034,9 @@ mq_inspect_directory_xattr (xlator_t *this,
if (strcmp (loc->path, "/") != 0) {
contribution = mq_add_new_contribution_node (this, ctx, loc);
if (contribution == NULL) {
- gf_log (this->name, GF_LOG_WARNING,
- "cannot add a new contribution node");
+ if (!uuid_is_null (loc->inode->gfid))
+ gf_log (this->name, GF_LOG_WARNING,
+ "cannot add a new contribution node");
ret = -1;
goto err;
}