From: npiggin@suse.de Date: Sun, 26 Apr 2009 10:25:53 +0000 (+1000) Subject: fs: dcache fix LRU ordering X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c490d79bb70c549e096099576b1df40a8810b0d8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Nick Piggin Signed-off-by: Al Viro --- diff --git a/fs/dcache.c b/fs/dcache.c index 1fcffebfb44f..75659a6fd1f8 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -481,7 +481,7 @@ restart: if ((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); } else { list_move_tail(&dentry->d_lru, &tmp);