@@ -113,7 +113,7 @@ static void wake_up_inode(struct inode *inode)
113113 * Prevent speculative execution through spin_unlock(&inode_lock);
114114 */
115115 smp_mb ();
116- wake_up_bit (& inode -> i_state , __I_LOCK );
116+ wake_up_bit (& inode -> i_state , __I_NEW );
117117}
118118
119119/**
@@ -690,17 +690,17 @@ void unlock_new_inode(struct inode *inode)
690690 }
691691#endif
692692 /*
693- * This is special! We do not need the spinlock when clearing I_LOCK ,
693+ * This is special! We do not need the spinlock when clearing I_NEW ,
694694 * because we're guaranteed that nobody else tries to do anything about
695695 * the state of the inode when it is locked, as we just created it (so
696- * there can be no old holders that haven't tested I_LOCK ).
696+ * there can be no old holders that haven't tested I_NEW ).
697697 * However we must emit the memory barrier so that other CPUs reliably
698- * see the clearing of I_LOCK after the other inode initialisation has
698+ * see the clearing of I_NEW after the other inode initialisation has
699699 * completed.
700700 */
701701 smp_mb ();
702- WARN_ON ((inode -> i_state & ( I_LOCK | I_NEW )) != ( I_LOCK | I_NEW ));
703- inode -> i_state &= ~( I_LOCK | I_NEW ) ;
702+ WARN_ON (! (inode -> i_state & I_NEW ));
703+ inode -> i_state &= ~I_NEW ;
704704 wake_up_inode (inode );
705705}
706706EXPORT_SYMBOL (unlock_new_inode );
@@ -731,7 +731,7 @@ static struct inode *get_new_inode(struct super_block *sb,
731731 goto set_failed ;
732732
733733 __inode_add_to_lists (sb , head , inode );
734- inode -> i_state = I_LOCK | I_NEW ;
734+ inode -> i_state = I_NEW ;
735735 spin_unlock (& inode_lock );
736736
737737 /* Return the locked inode with I_NEW set, the
@@ -778,7 +778,7 @@ static struct inode *get_new_inode_fast(struct super_block *sb,
778778 if (!old ) {
779779 inode -> i_ino = ino ;
780780 __inode_add_to_lists (sb , head , inode );
781- inode -> i_state = I_LOCK | I_NEW ;
781+ inode -> i_state = I_NEW ;
782782 spin_unlock (& inode_lock );
783783
784784 /* Return the locked inode with I_NEW set, the
@@ -1083,7 +1083,7 @@ int insert_inode_locked(struct inode *inode)
10831083 ino_t ino = inode -> i_ino ;
10841084 struct hlist_head * head = inode_hashtable + hash (sb , ino );
10851085
1086- inode -> i_state |= I_LOCK | I_NEW ;
1086+ inode -> i_state |= I_NEW ;
10871087 while (1 ) {
10881088 struct hlist_node * node ;
10891089 struct inode * old = NULL ;
@@ -1120,7 +1120,7 @@ int insert_inode_locked4(struct inode *inode, unsigned long hashval,
11201120 struct super_block * sb = inode -> i_sb ;
11211121 struct hlist_head * head = inode_hashtable + hash (sb , hashval );
11221122
1123- inode -> i_state |= I_LOCK | I_NEW ;
1123+ inode -> i_state |= I_NEW ;
11241124
11251125 while (1 ) {
11261126 struct hlist_node * node ;
@@ -1510,16 +1510,16 @@ EXPORT_SYMBOL(inode_wait);
15101510 * until the deletion _might_ have completed. Callers are responsible
15111511 * to recheck inode state.
15121512 *
1513- * It doesn't matter if I_LOCK is not set initially, a call to
1513+ * It doesn't matter if I_NEW is not set initially, a call to
15141514 * wake_up_inode() after removing from the hash list will DTRT.
15151515 *
15161516 * This is called with inode_lock held.
15171517 */
15181518static void __wait_on_freeing_inode (struct inode * inode )
15191519{
15201520 wait_queue_head_t * wq ;
1521- DEFINE_WAIT_BIT (wait , & inode -> i_state , __I_LOCK );
1522- wq = bit_waitqueue (& inode -> i_state , __I_LOCK );
1521+ DEFINE_WAIT_BIT (wait , & inode -> i_state , __I_NEW );
1522+ wq = bit_waitqueue (& inode -> i_state , __I_NEW );
15231523 prepare_to_wait (wq , & wait .wait , TASK_UNINTERRUPTIBLE );
15241524 spin_unlock (& inode_lock );
15251525 schedule ();
0 commit comments