Browse Source

ext4: fix quota accounting in case of fallocate

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>
Dmitry Monakhov 15 years ago
parent
commit
35121c9860
1 changed files with 2 additions and 1 deletions
  1. 2 1
      fs/ext4/inode.c

+ 2 - 1
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);
 	}
 
 	/*