diff options
Diffstat (limited to 'xlators')
| -rw-r--r-- | xlators/features/quota/src/quota.c | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 0cf31b52e8a..1911d63e364 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -2047,7 +2047,8 @@ quota_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          LOCK (&ctx->lock);          { -                ctx->buf = *buf; +                if (buf) +                        ctx->buf = *buf;          }          UNLOCK (&ctx->lock); @@ -2110,7 +2111,8 @@ quota_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          LOCK (&ctx->lock);          { -                ctx->buf = *buf; +                if (buf) +                        ctx->buf = *buf;          }          UNLOCK (&ctx->lock); @@ -2352,7 +2354,8 @@ quota_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          LOCK (&ctx->lock);          { -                ctx->buf = *statpost; +                if (statpost) +                        ctx->buf = *statpost;          }          UNLOCK (&ctx->lock);  | 
