Add a "nosymfollow" mount option.
[linux-block.git] / fs / namespace.c
index bae0e95b3713a3bf143754a523f603a5a330b8ab..6408788a649e1ae6ae2d155950e447f5e053c0eb 100644 (file)
@@ -3160,6 +3160,8 @@ int path_mount(const char *dev_name, struct path *path,
                mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME);
        if (flags & MS_RDONLY)
                mnt_flags |= MNT_READONLY;
+       if (flags & MS_NOSYMFOLLOW)
+               mnt_flags |= MNT_NOSYMFOLLOW;
 
        /* The default atime for remount is preservation */
        if ((flags & MS_REMOUNT) &&