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: v2.6.34.8~253 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b2b0f0ea18f2f696fc18eaff89ac3ab0e512150;p=thirdparty%2Fkernel%2Fstable.git ext4: fix quota accounting in case of fallocate commit 35121c9860316d7799cea0fbc359a9186e7c2747 upstream. allocated_meta_data is already included in 'used' variable. Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" Signed-off-by: Paul Gortmaker --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 81d6054128448..55bfcd94d1ab6 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); } /*