From: Dmitry Monakhov Date: Sun, 16 May 2010 04:00:00 +0000 (-0400) Subject: ext4: fix quota accounting in case of fallocate X-Git-Tag: upstream/snapshot3+hdmi~14134^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35121c9860316d7799cea0fbc359a9186e7c2747;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ext4: fix quota accounting in case of fallocate allocated_meta_data is already included in 'used' variable. Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 81d6054..55bfcd9 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1126,7 +1126,8 @@ void ext4_da_update_reserve_space(struct inode *inode, */ if (allocated_meta_blocks) dquot_claim_block(inode, allocated_meta_blocks); - dquot_release_reservation_block(inode, mdb_free + used); + dquot_release_reservation_block(inode, mdb_free + used - + allocated_meta_blocks); } /*