提交 c490d79b 编写于 作者: N npiggin@suse.de 提交者: Al Viro

fs: dcache fix LRU ordering

Fix ordering of LRU when moving referenced dentries to the head of the list
(they should go to the head of the list in the same order as they were found
from the tail, rather than reverse order).
Signed-off-by: NNick Piggin <npiggin@suse.de>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 a731d12d
...@@ -481,7 +481,7 @@ static void __shrink_dcache_sb(struct super_block *sb, int *count, int flags) ...@@ -481,7 +481,7 @@ static void __shrink_dcache_sb(struct super_block *sb, int *count, int flags)
if ((flags & DCACHE_REFERENCED) if ((flags & DCACHE_REFERENCED)
&& (dentry->d_flags & DCACHE_REFERENCED)) { && (dentry->d_flags & DCACHE_REFERENCED)) {
dentry->d_flags &= ~DCACHE_REFERENCED; dentry->d_flags &= ~DCACHE_REFERENCED;
list_move_tail(&dentry->d_lru, &referenced); list_move(&dentry->d_lru, &referenced);
spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock);
} else { } else {
list_move_tail(&dentry->d_lru, &tmp); list_move_tail(&dentry->d_lru, &tmp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册