@@ -1378,7 +1378,7 @@ static int ext3_journalled_write_end(struct file *file,
13781378 */
13791379 if (pos + len > inode -> i_size && ext3_can_truncate (inode ))
13801380 ext3_orphan_add (handle , inode );
1381- EXT3_I (inode ) -> i_state |= EXT3_STATE_JDATA ;
1381+ ext3_set_inode_state (inode , EXT3_STATE_JDATA ) ;
13821382 if (inode -> i_size > EXT3_I (inode )-> i_disksize ) {
13831383 EXT3_I (inode )-> i_disksize = inode -> i_size ;
13841384 ret2 = ext3_mark_inode_dirty (handle , inode );
@@ -1417,7 +1417,7 @@ static sector_t ext3_bmap(struct address_space *mapping, sector_t block)
14171417 journal_t * journal ;
14181418 int err ;
14191419
1420- if (EXT3_I (inode ) -> i_state & EXT3_STATE_JDATA ) {
1420+ if (ext3_test_inode_state (inode , EXT3_STATE_JDATA ) ) {
14211421 /*
14221422 * This is a REALLY heavyweight approach, but the use of
14231423 * bmap on dirty files is expected to be extremely rare:
@@ -1436,7 +1436,7 @@ static sector_t ext3_bmap(struct address_space *mapping, sector_t block)
14361436 * everything they get.
14371437 */
14381438
1439- EXT3_I (inode ) -> i_state &= ~ EXT3_STATE_JDATA ;
1439+ ext3_clear_inode_state (inode , EXT3_STATE_JDATA ) ;
14401440 journal = EXT3_JOURNAL (inode );
14411441 journal_lock_updates (journal );
14421442 err = journal_flush (journal );
@@ -1670,7 +1670,7 @@ static int ext3_journalled_writepage(struct page *page,
16701670 PAGE_CACHE_SIZE , NULL , write_end_fn );
16711671 if (ret == 0 )
16721672 ret = err ;
1673- EXT3_I (inode ) -> i_state |= EXT3_STATE_JDATA ;
1673+ ext3_set_inode_state (inode , EXT3_STATE_JDATA ) ;
16741674 unlock_page (page );
16751675 } else {
16761676 /*
@@ -2402,7 +2402,7 @@ void ext3_truncate(struct inode *inode)
24022402 goto out_notrans ;
24032403
24042404 if (inode -> i_size == 0 && ext3_should_writeback_data (inode ))
2405- ei -> i_state |= EXT3_STATE_FLUSH_ON_CLOSE ;
2405+ ext3_set_inode_state ( inode , EXT3_STATE_FLUSH_ON_CLOSE ) ;
24062406
24072407 /*
24082408 * We have to lock the EOF page here, because lock_page() nests
@@ -2721,7 +2721,7 @@ int ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc)
27212721{
27222722 /* We have all inode data except xattrs in memory here. */
27232723 return __ext3_get_inode_loc (inode , iloc ,
2724- !( EXT3_I ( inode ) -> i_state & EXT3_STATE_XATTR ));
2724+ !ext3_test_inode_state ( inode , EXT3_STATE_XATTR ));
27252725}
27262726
27272727void ext3_set_inode_flags (struct inode * inode )
@@ -2893,7 +2893,7 @@ struct inode *ext3_iget(struct super_block *sb, unsigned long ino)
28932893 EXT3_GOOD_OLD_INODE_SIZE +
28942894 ei -> i_extra_isize ;
28952895 if (* magic == cpu_to_le32 (EXT3_XATTR_MAGIC ))
2896- ei -> i_state |= EXT3_STATE_XATTR ;
2896+ ext3_set_inode_state ( inode , EXT3_STATE_XATTR ) ;
28972897 }
28982898 } else
28992899 ei -> i_extra_isize = 0 ;
@@ -2955,7 +2955,7 @@ static int ext3_do_update_inode(handle_t *handle,
29552955
29562956 /* For fields not not tracking in the in-memory inode,
29572957 * initialise them to zero for new inodes. */
2958- if (ei -> i_state & EXT3_STATE_NEW )
2958+ if (ext3_test_inode_state ( inode , EXT3_STATE_NEW ) )
29592959 memset (raw_inode , 0 , EXT3_SB (inode -> i_sb )-> s_inode_size );
29602960
29612961 ext3_get_inode_flags (ei );
@@ -3052,7 +3052,7 @@ static int ext3_do_update_inode(handle_t *handle,
30523052 rc = ext3_journal_dirty_metadata (handle , bh );
30533053 if (!err )
30543054 err = rc ;
3055- ei -> i_state &= ~ EXT3_STATE_NEW ;
3055+ ext3_clear_inode_state ( inode , EXT3_STATE_NEW ) ;
30563056
30573057 atomic_set (& ei -> i_sync_tid , handle -> h_transaction -> t_tid );
30583058out_brelse :
0 commit comments