Date:2010-04-29 04:10:43 (12 years 5 months ago)
Author:Al Viro
Message: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

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

Signed-off-by: Al Viro <>
Signed-off-by: Linus Torvalds <>
Files: fs/nfs/dir.c (1 diff)

Change Details

837837        /* If we have submounts, don't unhash ! */
838838        if (have_submounts(dentry))
839839            goto out_valid;
840        if (dentry->d_flags & DCACHE_DISCONNECTED)
841            goto out_valid;
840842        shrink_dcache_parent(dentry);
841843    }
842844    d_drop(dentry);

Archive Download the corresponding diff file