@@ -365,7 +365,7 @@ struct inode *nilfs_new_inode(struct inode *dir, umode_t mode)
365365
366366 failed_after_creation :
367367 clear_nlink (inode );
368- if (inode -> i_state & I_NEW )
368+ if (inode_state_read_once ( inode ) & I_NEW )
369369 unlock_new_inode (inode );
370370 iput (inode ); /*
371371 * raw_inode will be deleted through
@@ -562,7 +562,7 @@ struct inode *nilfs_iget(struct super_block *sb, struct nilfs_root *root,
562562 if (unlikely (!inode ))
563563 return ERR_PTR (- ENOMEM );
564564
565- if (!(inode -> i_state & I_NEW )) {
565+ if (!(inode_state_read_once ( inode ) & I_NEW )) {
566566 if (!inode -> i_nlink ) {
567567 iput (inode );
568568 return ERR_PTR (- ESTALE );
@@ -591,7 +591,7 @@ struct inode *nilfs_iget_for_gc(struct super_block *sb, unsigned long ino,
591591 inode = iget5_locked (sb , ino , nilfs_iget_test , nilfs_iget_set , & args );
592592 if (unlikely (!inode ))
593593 return ERR_PTR (- ENOMEM );
594- if (!(inode -> i_state & I_NEW ))
594+ if (!(inode_state_read_once ( inode ) & I_NEW ))
595595 return inode ;
596596
597597 err = nilfs_init_gcinode (inode );
@@ -631,7 +631,7 @@ int nilfs_attach_btree_node_cache(struct inode *inode)
631631 nilfs_iget_set , & args );
632632 if (unlikely (!btnc_inode ))
633633 return - ENOMEM ;
634- if (btnc_inode -> i_state & I_NEW ) {
634+ if (inode_state_read_once ( btnc_inode ) & I_NEW ) {
635635 nilfs_init_btnc_inode (btnc_inode );
636636 unlock_new_inode (btnc_inode );
637637 }
@@ -686,7 +686,7 @@ struct inode *nilfs_iget_for_shadow(struct inode *inode)
686686 nilfs_iget_set , & args );
687687 if (unlikely (!s_inode ))
688688 return ERR_PTR (- ENOMEM );
689- if (!(s_inode -> i_state & I_NEW ))
689+ if (!(inode_state_read_once ( s_inode ) & I_NEW ))
690690 return inode ;
691691
692692 NILFS_I (s_inode )-> i_flags = 0 ;
0 commit comments