aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/balloc.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-01-10 12:12:36 -0500
committerTheodore Ts'o <tytso@mit.edu>2011-01-10 12:12:36 -0500
commitf232109773ff5b0c840a6761d74940b9cf0d66ec (patch)
treea32da5ebd1a3e074e9f52107f3bdc23babb6340c /fs/ext4/balloc.c
parentad4fb9cafe100a4a9de6e0529015e584d94ac8dc (diff)
downloadkernel_samsung_smdk4412-f232109773ff5b0c840a6761d74940b9cf0d66ec.zip
kernel_samsung_smdk4412-f232109773ff5b0c840a6761d74940b9cf0d66ec.tar.gz
kernel_samsung_smdk4412-f232109773ff5b0c840a6761d74940b9cf0d66ec.tar.bz2
ext4: replace i_delalloc_reserved_flag with EXT4_STATE_DELALLOC_RESERVED
Remove the short element i_delalloc_reserved_flag from the ext4_inode_info structure and replace it a new bit in i_state_flags. Since we have an ext4_inode_info for every ext4 inode cached in the inode cache, any savings we can produce here is a very good thing from a memory utilization perspective. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r--fs/ext4/balloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 14c3af2..adf96b8 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -592,7 +592,8 @@ ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode,
* Account for the allocated meta blocks. We will never
* fail EDQUOT for metdata, but we do account for it.
*/
- if (!(*errp) && EXT4_I(inode)->i_delalloc_reserved_flag) {
+ if (!(*errp) &&
+ ext4_test_inode_state(inode, EXT4_STATE_DELALLOC_RESERVED)) {
spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
EXT4_I(inode)->i_allocated_meta_blocks += ar.len;
spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);