Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nfs d_revalidate() is too trigger-happy with d_drop()

If dentry found stale happens to be a root of disconnected tree, we
can't d_drop() it; its d_hash is actually part of s_anon and d_drop()
would simply hide it from shrink_dcache_for_umount(), leading to
all sorts of fun, including busy inodes on umount and oopsen after
that.

Bug had been there since at least 2006 (commit c636eb already has it),
so it's definitely -stable fodder.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Al Viro and committed by
Linus Torvalds
d9e80b7d 1d16b0f2

+2
+2
fs/nfs/dir.c
··· 837 837 /* If we have submounts, don't unhash ! */ 838 838 if (have_submounts(dentry)) 839 839 goto out_valid; 840 + if (dentry->d_flags & DCACHE_DISCONNECTED) 841 + goto out_valid; 840 842 shrink_dcache_parent(dentry); 841 843 } 842 844 d_drop(dentry);