From: Gerlando Falauto Date: Tue, 18 Oct 2011 08:58:50 +0000 (+0200) Subject: CIFS: fix automount for DFS shares X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ad4778fb40994dd7c779069dad6ff704d75b81e6;p=linux-beck.git CIFS: fix automount for DFS shares Automounting directories are now invalidated by .d_revalidate() so to be d_instantiate()d again with the right DCACHE_NEED_AUTOMOUNT flag Reviewed-by: Jeff Layton Signed-off-by: Gerlando Falauto Signed-off-by: Steve French --- diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 0c8098d54d2b..d7eeb9d3ed6f 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -648,8 +648,16 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) if (direntry->d_inode) { if (cifs_revalidate_dentry(direntry)) return 0; - else + else { + /* + * Forcibly invalidate automounting directory inodes + * (remote DFS directories) so to have them + * instantiated again for automount + */ + if (IS_AUTOMOUNT(direntry->d_inode)) + return 0; return 1; + } } /*