VFS: Pass mount flags to sget()
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / mtdsuper.c
index a90bfe79916d29c6f7c2460e9dc644dadc46904e..334da5f583c021124ea2e64ae7860f513bd9816f 100644 (file)
@@ -63,7 +63,7 @@ static struct dentry *mount_mtd_aux(struct file_system_type *fs_type, int flags,
        struct super_block *sb;
        int ret;
 
-       sb = sget(fs_type, get_sb_mtd_compare, get_sb_mtd_set, mtd);
+       sb = sget(fs_type, get_sb_mtd_compare, get_sb_mtd_set, flags, mtd);
        if (IS_ERR(sb))
                goto out_error;
 
@@ -74,8 +74,6 @@ static struct dentry *mount_mtd_aux(struct file_system_type *fs_type, int flags,
        pr_debug("MTDSB: New superblock for device %d (\"%s\")\n",
              mtd->index, mtd->name);
 
-       sb->s_flags = flags;
-
        ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0);
        if (ret < 0) {
                deactivate_locked_super(sb);