mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 16:48:26 +02:00 
			
		
		
		
	vfs: fix spinning prevention in prune_icache_sb
We need to move the inode to the end of the list to actually make the spinning prevention explained in the comment above it work. With a plain list_move it will simply stay in place as we're always reclaiming from the head of the list. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
		
							parent
							
								
									948409c74d
								
							
						
					
					
						commit
						62a3ddef61
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -634,7 +634,7 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan) | |||
| 		 * inode to the back of the list so we don't spin on it. | ||||
| 		 */ | ||||
| 		if (!spin_trylock(&inode->i_lock)) { | ||||
| 			list_move(&inode->i_lru, &sb->s_inode_lru); | ||||
| 			list_move_tail(&inode->i_lru, &sb->s_inode_lru); | ||||
| 			continue; | ||||
| 		} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Christoph Hellwig
						Christoph Hellwig