summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/quota/src/quota.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 0b0f8ce93..6400505ad 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -463,7 +463,8 @@ __quota_init_inode_ctx (inode_t *inode, int64_t limit, xlator_t *this,
QUOTA_ALLOC_OR_GOTO (ctx, quota_inode_ctx_t, out);
ctx->limit = limit;
- ctx->buf = *buf;
+ if (buf)
+ ctx->buf = *buf;
LOCK_INIT(&ctx->lock);