@@ -453,39 +453,6 @@ static void inode_lru_list_del(struct inode *inode)
453453 this_cpu_dec (nr_unused );
454454}
455455
456- static void inode_pin_lru_isolating (struct inode * inode )
457- {
458- lockdep_assert_held (& inode -> i_lock );
459- WARN_ON (inode -> i_state & (I_LRU_ISOLATING | I_FREEING | I_WILL_FREE ));
460- inode -> i_state |= I_LRU_ISOLATING ;
461- }
462-
463- static void inode_unpin_lru_isolating (struct inode * inode )
464- {
465- spin_lock (& inode -> i_lock );
466- WARN_ON (!(inode -> i_state & I_LRU_ISOLATING ));
467- inode -> i_state &= ~I_LRU_ISOLATING ;
468- smp_mb ();
469- wake_up_bit (& inode -> i_state , __I_LRU_ISOLATING );
470- spin_unlock (& inode -> i_lock );
471- }
472-
473- static void inode_wait_for_lru_isolating (struct inode * inode )
474- {
475- spin_lock (& inode -> i_lock );
476- if (inode -> i_state & I_LRU_ISOLATING ) {
477- DEFINE_WAIT_BIT (wq , & inode -> i_state , __I_LRU_ISOLATING );
478- wait_queue_head_t * wqh ;
479-
480- wqh = bit_waitqueue (& inode -> i_state , __I_LRU_ISOLATING );
481- spin_unlock (& inode -> i_lock );
482- __wait_on_bit (wqh , & wq , bit_wait , TASK_UNINTERRUPTIBLE );
483- spin_lock (& inode -> i_lock );
484- WARN_ON (inode -> i_state & I_LRU_ISOLATING );
485- }
486- spin_unlock (& inode -> i_lock );
487- }
488-
489456/**
490457 * inode_sb_list_add - add inode to the superblock list of inodes
491458 * @inode: inode to add
@@ -598,8 +565,6 @@ static void evict(struct inode *inode)
598565
599566 inode_sb_list_del (inode );
600567
601- inode_wait_for_lru_isolating (inode );
602-
603568 /*
604569 * Wait for flusher thread to be done with the inode so that filesystem
605570 * does not start destroying it while writeback is still running. Since
@@ -803,7 +768,7 @@ static enum lru_status inode_lru_isolate(struct list_head *item,
803768 }
804769
805770 if (inode_has_buffers (inode ) || inode -> i_data .nrpages ) {
806- inode_pin_lru_isolating (inode );
771+ __iget (inode );
807772 spin_unlock (& inode -> i_lock );
808773 spin_unlock (lru_lock );
809774 if (remove_inode_buffers (inode )) {
@@ -816,7 +781,7 @@ static enum lru_status inode_lru_isolate(struct list_head *item,
816781 if (current -> reclaim_state )
817782 current -> reclaim_state -> reclaimed_slab += reap ;
818783 }
819- inode_unpin_lru_isolating (inode );
784+ iput (inode );
820785 spin_lock (lru_lock );
821786 return LRU_RETRY ;
822787 }
0 commit comments