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 f1eb8cc..d4a6dd7 100644 (file)
@@ -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)) {