]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ext4: fix quota accounting in case of fallocate
authorDmitry Monakhov <dmonakhov@openvz.org>
Sun, 16 May 2010 04:00:00 +0000 (00:00 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:34 +0000 (18:07 -0500)
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>
fs/ext4/inode.c

index 81d605412844895c4386c92c0f4920db39acbd94..55bfcd94d1ab6a396cd343bf836910a7704f5f75 100644 (file)
@@ -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);
        }
 
        /*