aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-05-16 00:00:00 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-06 18:07:34 -0500
commit8b2b0f0ea18f2f696fc18eaff89ac3ab0e512150 (patch)
treee65b7250abe951534673fbb9b98b416bb5322917
parentd14f90a2e15b6312b5c25ec445edecbb77b3cd1c (diff)
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 <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--fs/ext4/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 81d60541284..55bfcd94d1a 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);
}
/*