linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] VFS: Go through the LRU list of inode from head
@ 2012-06-21  9:00 Cong Meng
  2012-06-21  9:47 ` Wanpeng Li
  2012-06-21  9:52 ` Jan Kara
  0 siblings, 2 replies; 5+ messages in thread
From: Cong Meng @ 2012-06-21  9:00 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-fsdevel, linux-kernel, Cong Meng

Go through the LRU list of inode from head.

(I'm not sure whether there is any trick here I doesn't get.  If yes, 
any one could explain it)

Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com>
---
 fs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/inode.c b/fs/inode.c
index 775cbab..aac8449 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -704,7 +704,7 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)
 		if (list_empty(&sb->s_inode_lru))
 			break;
 
-		inode = list_entry(sb->s_inode_lru.prev, struct inode, i_lru);
+		inode = list_entry(sb->s_inode_lru.next, struct inode, i_lru);
 
 		/*
 		 * we are inverting the sb->s_inode_lru_lock/inode->i_lock here,
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-27 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21  9:00 [PATCH] VFS: Go through the LRU list of inode from head Cong Meng
2012-06-21  9:47 ` Wanpeng Li
2012-06-21  9:52 ` Jan Kara
2012-06-26  7:35   ` mc
2012-06-27 16:08     ` Jan Kara

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).