aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-06-14 09:54:48 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-06-14 09:54:48 -0400
commit07a038245b28df9196ffb2e8cc626e9b956a4e23 (patch)
tree33faae4d5785d5cdd83381f0feff5798845feafc
parenta0375156ca1041574b5d47cc7e32f10b891151b0 (diff)
ext4: Convert more i_flags references to use accessor functions
These changes are not ones which are likely to result in races, but they should be fixed. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--fs/ext4/dir.c3
-rw-r--r--fs/ext4/inode.c4
-rw-r--r--fs/ext4/migrate.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index ea5e6cb7e2a5..2965c39d4183 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -121,7 +121,8 @@ static int ext4_readdir(struct file *filp,
121 * We don't set the inode dirty flag since it's not 121 * We don't set the inode dirty flag since it's not
122 * critical that it get flushed back to the disk. 122 * critical that it get flushed back to the disk.
123 */ 123 */
124 ext4_clear_inode_flag(filp->f_path.dentry->d_inode, EXT4_INODE_INDEX); 124 ext4_clear_inode_flag(filp->f_path.dentry->d_inode,
125 EXT4_INODE_INDEX);
125 } 126 }
126 stored = 0; 127 stored = 0;
127 offset = filp->f_pos & (sb->s_blocksize - 1); 128 offset = filp->f_pos & (sb->s_blocksize - 1);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 42272d67955a..6c6614cae9e6 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4976,7 +4976,7 @@ static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode,
4976 /* we are using combined 48 bit field */ 4976 /* we are using combined 48 bit field */
4977 i_blocks = ((u64)le16_to_cpu(raw_inode->i_blocks_high)) << 32 | 4977 i_blocks = ((u64)le16_to_cpu(raw_inode->i_blocks_high)) << 32 |
4978 le32_to_cpu(raw_inode->i_blocks_lo); 4978 le32_to_cpu(raw_inode->i_blocks_lo);
4979 if (ei->i_flags & EXT4_HUGE_FILE_FL) { 4979 if (ext4_test_inode_flag(inode, EXT4_INODE_HUGE_FILE)) {
4980 /* i_blocks represent file system block size */ 4980 /* i_blocks represent file system block size */
4981 return i_blocks << (inode->i_blkbits - 9); 4981 return i_blocks << (inode->i_blkbits - 9);
4982 } else { 4982 } else {
@@ -5126,7 +5126,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
5126 ei->i_file_acl); 5126 ei->i_file_acl);
5127 ret = -EIO; 5127 ret = -EIO;
5128 goto bad_inode; 5128 goto bad_inode;
5129 } else if (ei->i_flags & EXT4_EXTENTS_FL) { 5129 } else if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) {
5130 if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || 5130 if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
5131 (S_ISLNK(inode->i_mode) && 5131 (S_ISLNK(inode->i_mode) &&
5132 !ext4_inode_is_fast_symlink(inode))) 5132 !ext4_inode_is_fast_symlink(inode)))
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 6f3a27ec30bf..1765c2c50a9b 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -376,7 +376,7 @@ static int ext4_ext_swap_inode_data(handle_t *handle, struct inode *inode,
376 * We have the extent map build with the tmp inode. 376 * We have the extent map build with the tmp inode.
377 * Now copy the i_data across 377 * Now copy the i_data across
378 */ 378 */
379 ei->i_flags |= EXT4_EXTENTS_FL; 379 ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS);
380 memcpy(ei->i_data, tmp_ei->i_data, sizeof(ei->i_data)); 380 memcpy(ei->i_data, tmp_ei->i_data, sizeof(ei->i_data));
381 381
382 /* 382 /*