Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad4778fb authored by Gerlando Falauto's avatar Gerlando Falauto Committed by Steve French
Browse files

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: default avatarJeff Layton <jlayton@samba.org>
Signed-off-by: default avatarGerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent 7748dd6e
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -648,9 +648,17 @@ 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;
		}
	}

	/*
	 * This may be nfsd (or something), anyway, we can't see the