]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - fs/namespace.c
fs: indicate request originates from old mount API
[thirdparty/linux.git] / fs / namespace.c
index fbf0e596fcd30c9bae8d8cc1fbe09cf309f02334..6c39ec020a5f4cd0c5e74e2528d0323abc67e78b 100644 (file)
@@ -2875,7 +2875,12 @@ static int do_remount(struct path *path, int ms_flags, int sb_flags,
        if (IS_ERR(fc))
                return PTR_ERR(fc);
 
+       /*
+        * Indicate to the filesystem that the remount request is coming
+        * from the legacy mount system call.
+        */
        fc->oldapi = true;
+
        err = parse_monolithic_mount_data(fc, data);
        if (!err) {
                down_write(&sb->s_umount);
@@ -3324,6 +3329,12 @@ static int do_new_mount(struct path *path, const char *fstype, int sb_flags,
        if (IS_ERR(fc))
                return PTR_ERR(fc);
 
+       /*
+        * Indicate to the filesystem that the mount request is coming
+        * from the legacy mount system call.
+        */
+       fc->oldapi = true;
+
        if (subtype)
                err = vfs_parse_fs_string(fc, "subtype",
                                          subtype, strlen(subtype));