diff options
Diffstat (limited to 'fs/affs/super.c')
-rw-r--r-- | fs/affs/super.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c index 3f89c9e05b40..cc7571201b4f 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -526,7 +526,7 @@ affs_remount(struct super_block *sb, int *flags, char *data) char *prefix = NULL; new_opts = kstrdup(data, GFP_KERNEL); - if (!new_opts) + if (data && !new_opts) return -ENOMEM; pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data); @@ -544,7 +544,8 @@ affs_remount(struct super_block *sb, int *flags, char *data) } flush_delayed_work(&sbi->sb_work); - replace_mount_options(sb, new_opts); + if (new_opts) + replace_mount_options(sb, new_opts); sbi->s_flags = mount_flags; sbi->s_mode = mode; |