dcache: don't clear DCACHE_DISCONNECTED too early
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 18 Jul 2012 22:27:37 +0000 (16:27 -0600)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 Nov 2013 05:16:34 +0000 (00:16 -0500)
DCACHE_DISCONNECTED should not be cleared until we're sure the dentry is
connected all the way up to the root of the filesystem.  It *shouldn't*
be cleared as soon as the dentry is connected to a parent.  That will
cause bugs at least on exportable filesystems.

Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c

index 67662beebc721bd390899e6c02fe3d9fe9c592b8..72c99b88d264f68927d8de11e9138309fa87ea2b 100644 (file)
@@ -2757,7 +2757,6 @@ static void __d_materialise_dentry(struct dentry *dentry, struct dentry *anon)
        spin_unlock(&dentry->d_lock);
 
        /* anon->d_lock still locked, returns locked */
-       anon->d_flags &= ~DCACHE_DISCONNECTED;
 }
 
 /**