diff options
| -rw-r--r-- | xlators/features/quota/src/quota.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 665999860a8..f563873d040 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -3505,13 +3505,13 @@ quota_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,          if (ctx->hard_lim <= 0) {                  inode_ctx_get (inode->table->root, this, &value);                  ctx = (quota_inode_ctx_t *)(unsigned long) value; -                if (!ctx) +                if (!ctx || ctx->hard_lim < 0)                          goto unwind;          } -	usage = (ctx->size) / buf->f_bsize; +        { /* statfs is adjusted in this code block */ +                usage = (ctx->size) / buf->f_bsize; -        if (ctx->hard_lim > 0) {                  blocks = ctx->hard_lim / buf->f_bsize;                  buf->f_blocks = blocks;  | 
