Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c490d79b authored by npiggin@suse.de's avatar npiggin@suse.de Committed by Al Viro
Browse files

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: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a731d12d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ static void __shrink_dcache_sb(struct super_block *sb, int *count, int flags)
			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);