Skip to content

Commit 62a3dde

Browse files
Christoph Hellwigroot
authored andcommitted
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>
1 parent 948409c commit 62a3dde

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)
634634
* inode to the back of the list so we don't spin on it.
635635
*/
636636
if (!spin_trylock(&inode->i_lock)) {
637-
list_move(&inode->i_lru, &sb->s_inode_lru);
637+
list_move_tail(&inode->i_lru, &sb->s_inode_lru);
638638
continue;
639639
}
640640

0 commit comments

Comments
 (0)