Skip to content

Commit

Permalink
ext4: fix quota accounting in case of fallocate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Monakhov authored and Theodore Ts'o committed May 16, 2010
1 parent b684b2e commit 35121c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 35121c9

Please sign in to comment.