summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/quota/src/quota.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 2170e646..114febff 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -1008,8 +1008,10 @@ quota_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
UNLOCK (&ctx->lock);
+ if (postbuf->ia_blocks != prebuf->ia_blocks)
+ delta = local->delta;
+
list_for_each_entry (dentry, &ctx->parents, next) {
- delta = (postbuf->ia_blocks - prebuf->ia_blocks) * 512;
quota_update_size (this, local->loc.inode, dentry->name,
dentry->par, delta);
}
@@ -1114,6 +1116,7 @@ quota_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
UNLOCK (&ctx->lock);
local->delta = size;
+
local->link_count = parents;
local->stub = stub;