summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authornpiggin@suse.de <npiggin@suse.de>2009-04-26 20:25:53 +1000
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 10:49:40 -0400
commitc490d79bb70c549e096099576b1df40a8810b0d8 (patch)
tree4ebdb76143b6ebaa287274548a1d2c844a94f63e /fs/dcache.c
parenta731d12d6ddd1e703770cacb5dfecb155b03ee06 (diff)
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 <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 1fcffebfb44..75659a6fd1f 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);