Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / fs / namei.c
index e99e2a9..d4a6dd7 100644 (file)
@@ -568,8 +568,8 @@ static bool path_connected(struct vfsmount *mnt, struct dentry *dentry)
 {
        struct super_block *sb = mnt->mnt_sb;
 
-       /* Bind mounts and multi-root filesystems can have disconnected paths */
-       if (!(sb->s_iflags & SB_I_MULTIROOT) && (mnt->mnt_root == sb->s_root))
+       /* Bind mounts can have disconnected paths */
+       if (mnt->mnt_root == sb->s_root)
                return true;
 
        return is_subdir(dentry, mnt->mnt_root);
@@ -1626,7 +1626,8 @@ static const char *pick_link(struct nameidata *nd, struct path *link,
                        return ERR_PTR(error);
        }
 
-       if (unlikely(nd->flags & LOOKUP_NO_SYMLINKS))
+       if (unlikely(nd->flags & LOOKUP_NO_SYMLINKS) ||
+                       unlikely(link->mnt->mnt_flags & MNT_NOSYMFOLLOW))
                return ERR_PTR(-ELOOP);
 
        if (!(nd->flags & LOOKUP_RCU)) {