vfs: fix dentry LRU list handling and nr_dentry_unused accounting
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Sep 2013 02:55:10 +0000 (22:55 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Sep 2013 02:55:10 +0000 (22:55 -0400)
commit89dc77bcdabf42ec99553f5837aa4bb8255a088c
tree5648f91439538e2a4fd892a4ab525dd99bb2a44d
parentbdbdfdef5766c2a60185e946df242f1bc0d37c09
vfs: fix dentry LRU list handling and nr_dentry_unused accounting

The LRU list changes interacted badly with our nr_dentry_unused
accounting, and even worse with the new DCACHE_LRU_LIST bit logic.

This introduces helper functions to make sure everything follows the
proper dcache d_lru list rules: the dentry cache is complicated by the
fact that some of the hotpaths don't even want to look at the LRU list
at all, and the fact that we use the same list entry in the dentry for
both the LRU list and for our temporary shrinking lists when removing
things from the LRU.

The helper functions temporarily have some extra sanity checking for the
flag bits that have to match the current LRU state of the dentry.  We'll
remove that before the final 3.12 release, but considering how easy it
is to get wrong, this first cleanup version has some very particular
sanity checking.

Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/dcache.c
This page took 0.025614 seconds and 5 git commands to generate.