]> git.baikalelectronics.ru Git - kernel.git/commit
dealing with the rest of shrink_dentry_list() livelock
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 29 May 2014 13:11:45 +0000 (09:11 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 30 May 2014 15:10:33 +0000 (11:10 -0400)
commit6826e45021ab4a7a4a1e0590df2606ecd03c0f24
tree4c0845c5bdbcfba145459fb1a5f9853f762fb64c
parenteffe565cf6bf00283c18f103ccf1210bd815dfa4
dealing with the rest of shrink_dentry_list() livelock

We have the same problem with ->d_lock order in the inner loop, where
we are dropping references to ancestors.  Same solution, basically -
instead of using dentry_kill() we use lock_parent() (introduced in the
previous commit) to get that lock in a safe way, recheck ->d_count
(in case if lock_parent() has ended up dropping and retaking ->d_lock
and somebody managed to grab a reference during that window), trylock
the inode->i_lock and use __dentry_kill() to do the rest.

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