From: Dmitry Monakhov Date: Mon, 31 May 2010 02:49:48 +0000 (-0400) Subject: ext4: fix quota accounting in case of fallocate X-Git-Tag: v2.6.32.17~52 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c6671bf3517688371200d8b7e0aaf81e8d82bcc;p=karo-tx-linux.git ext4: fix quota accounting in case of fallocate commit 35121c9860316d7799cea0fbc359a9186e7c2747 upstream (as of v2.6.34-git13) allocated_meta_data is already included in 'used' variable. Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 45e6961b9614..fc06fcd0c5ab 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1149,7 +1149,8 @@ void ext4_da_update_reserve_space(struct inode *inode, */ if (allocated_meta_blocks) vfs_dq_claim_block(inode, allocated_meta_blocks); - vfs_dq_release_reservation_block(inode, mdb_free + used); + vfs_dq_release_reservation_block(inode, mdb_free + used - + allocated_meta_blocks); } /*