aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-01-10 12:18:25 -0500
committerTheodore Ts'o <tytso@mit.edu>2011-01-10 12:18:25 -0500
commit353eb83c1422c6326eaab30ce044a179c6018169 (patch)
treefd43e39b344de5ee43d82c90f0affda68a65f2df /fs/ext4/inode.c
parent8a2005d3f84457b7d7d8646ab5195341d9e5f06a (diff)
ext4: drop i_state_flags on architectures with 64-bit longs
We can store the dynamic inode state flags in the high bits of EXT4_I(inode)->i_flags, and eliminate i_state_flags. This saves 8 bytes from the size of ext4_inode_info structure, which when multiplied by the number of the number of in the inode cache, can save a lot of memory. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3ae83137cf34..0801ee6a173e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4868,7 +4868,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4868 } 4868 }
4869 inode->i_nlink = le16_to_cpu(raw_inode->i_links_count); 4869 inode->i_nlink = le16_to_cpu(raw_inode->i_links_count);
4870 4870
4871 ei->i_state_flags = 0; 4871 ext4_clear_state_flags(ei); /* Only relevant on 32-bit archs */
4872 ei->i_dir_start_lookup = 0; 4872 ei->i_dir_start_lookup = 0;
4873 ei->i_dtime = le32_to_cpu(raw_inode->i_dtime); 4873 ei->i_dtime = le32_to_cpu(raw_inode->i_dtime);
4874 /* We now have enough fields to check if the inode was active or not. 4874 /* We now have enough fields to check if the inode was active or not.
@@ -5127,7 +5127,7 @@ static int ext4_do_update_inode(handle_t *handle,
5127 if (ext4_inode_blocks_set(handle, raw_inode, ei)) 5127 if (ext4_inode_blocks_set(handle, raw_inode, ei))
5128 goto out_brelse; 5128 goto out_brelse;
5129 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime); 5129 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
5130 raw_inode->i_flags = cpu_to_le32(ei->i_flags); 5130 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
5131 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != 5131 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
5132 cpu_to_le32(EXT4_OS_HURD)) 5132 cpu_to_le32(EXT4_OS_HURD))
5133 raw_inode->i_file_acl_high = 5133 raw_inode->i_file_acl_high =