diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-05-30 22:49:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 10:21:11 -0700 |
commit | 5d11fc79a018ac6f347b6e8cc39d8dc5c52bb064 (patch) | |
tree | ce6378b28990d8466d464d4ea48da9bff5edce96 /fs/ext4 | |
parent | beb62f7a7f25fe3b0eeca660d2af3949cde768b4 (diff) |
ext4: Fix accounting of reserved metadata blocks
commit ee5f4d9cdf32fd99172d11665c592a288c2b1ff4 upstream (as of v2.6.33-rc3)
Commit 0637c6f had a typo which caused the reserved metadata blocks to
not be released correctly. Fix this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e7248baa728..c3e1d0fda4d 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1118,9 +1118,9 @@ static void ext4_da_update_reserve_space(struct inode *inode, int used) * only when we have written all of the delayed * allocation blocks. */ - mdb_free = ei->i_allocated_meta_blocks; + mdb_free = ei->i_reserved_meta_blocks; + ei->i_reserved_meta_blocks = 0; percpu_counter_sub(&sbi->s_dirtyblocks_counter, mdb_free); - ei->i_allocated_meta_blocks = 0; } spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); @@ -1931,8 +1931,8 @@ static void ext4_da_release_space(struct inode *inode, int to_free) * only when we have written all of the delayed * allocation blocks. */ - to_free += ei->i_allocated_meta_blocks; - ei->i_allocated_meta_blocks = 0; + to_free += ei->i_reserved_meta_blocks; + ei->i_reserved_meta_blocks = 0; } /* update fs dirty blocks counter */ |