On Mon, Sep 09, 2013 at 01:46:47AM +0100, Al Viro wrote: > On Sat, Sep 07, 2013 at 02:46:01PM -0400, J. Bruce Fields wrote: > > From: "J. Bruce Fields" <bfields@xxxxxxxxxx> > > > > 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. > > Then you probably want this > if (!IS_ROOT(pd)) { > /* must have found a connected parent - great */ > spin_lock(&pd->d_lock); > pd->d_flags &= ~DCACHE_DISCONNECTED; > spin_unlock(&pd->d_lock); > noprogress = 0; > to go through all intermediates, clearing DCACHE_DISCONNECTED on all of > them; O(depth^2) can suck when we have a long chain of directories... Aka call reconnect_path() from fs/exportfs/expfs.c on it. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html