* [PATCH] vfs: fix spinning prevention in prune_icache_sb
@ 2011-10-28 8:08 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2011-10-28 8:08 UTC (permalink / raw)
To: linux-fsdevel
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>
diff --git a/fs/inode.c b/fs/inode.c
index ca27d4e..4b8492a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -715,7 +715,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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-28 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-28 8:08 [PATCH] vfs: fix spinning prevention in prune_icache_sb Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).