]> git.baikalelectronics.ru Git - kernel.git/commit
fs: clean up dentry lru modification
authorChristoph Hellwig <hch@infradead.org>
Sun, 10 Oct 2010 09:36:26 +0000 (05:36 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Oct 2010 01:26:13 +0000 (21:26 -0400)
commit92f8f0ed7b232cbeb2459b80967b5ddce2d10b7d
tree5c28962f355c545f888ab7b8e95e8bce5c2de599
parent426d1e83a28c614bffdce660f23f1783468defea
fs: clean up dentry lru modification

Always do a list_del_init on the LRU to make sure the list_empty invariant for
not beeing on the LRU always holds true, and fold dentry_lru_del_init into
dentry_lru_del.  Replace the dentry_lru_add_tail primitive with a
dentry_lru_move_tail operations that simpler when the dentry already is one
the list, which is always is.  Move the list_empty into dentry_lru_add to
fit the scheme of the other lru helpers, and simplify locking once we
move to a separate LRU lock.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c