From: Al Viro Date: Thu, 29 May 2014 13:11:45 +0000 (-0400) Subject: dealing with the rest of shrink_dentry_list() livelock X-Git-Tag: omap-for-v3.16/fixes-against-rc1~124^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2b80195d8829921506880f6dccd21cabd163d0d;p=pandora-kernel.git 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 --- Reading git-diff-tree failed