summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/marker/src/marker-quota-helper.c')
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index 6265ffbac6e..5611c1d8bdc 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -169,6 +169,9 @@ mq_get_contribution_node (inode_t *inode, quota_inode_ctx_t *ctx)
LOCK (&ctx->lock);
{
+ if (list_empty (&ctx->contribution_head))
+ goto unlock;
+
list_for_each_entry (temp, &ctx->contribution_head,
contri_list) {
if (gf_uuid_compare (temp->gfid, inode->gfid) == 0) {
@@ -178,7 +181,9 @@ mq_get_contribution_node (inode_t *inode, quota_inode_ctx_t *ctx)
}
}
}
+unlock:
UNLOCK (&ctx->lock);
+
out:
return contri;
}