From: Dmitry Monakhov Date: Sun, 16 May 2010 04:00:00 +0000 (-0400) Subject: ext4: fix quota accounting in case of fallocate X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=35121c9860316d7799cea0fbc359a9186e7c2747;p=openwrt%2Fstaging%2Fblogic.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 81d605412844..55bfcd94d1ab 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); } /*