Commit 07a038245b28df9196ffb2e8cc626e9b956a4e23

Authored by Theodore Ts'o
1 parent a0375156ca

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>

Showing 3 changed files with 5 additions and 4 deletions Side-by-side Diff

... ... @@ -121,7 +121,8 @@
121 121 * We don't set the inode dirty flag since it's not
122 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 127 stored = 0;
127 128 offset = filp->f_pos & (sb->s_blocksize - 1);
... ... @@ -4976,7 +4976,7 @@
4976 4976 /* we are using combined 48 bit field */
4977 4977 i_blocks = ((u64)le16_to_cpu(raw_inode->i_blocks_high)) << 32 |
4978 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 4980 /* i_blocks represent file system block size */
4981 4981 return i_blocks << (inode->i_blkbits - 9);
4982 4982 } else {
... ... @@ -5126,7 +5126,7 @@
5126 5126 ei->i_file_acl);
5127 5127 ret = -EIO;
5128 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 5130 if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
5131 5131 (S_ISLNK(inode->i_mode) &&
5132 5132 !ext4_inode_is_fast_symlink(inode)))
... ... @@ -376,7 +376,7 @@
376 376 * We have the extent map build with the tmp inode.
377 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 380 memcpy(ei->i_data, tmp_ei->i_data, sizeof(ei->i_data));
381 381  
382 382 /*