diff options
Diffstat (limited to 'kernel/fs/affs/super.c')
-rw-r--r-- | kernel/fs/affs/super.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/fs/affs/super.c b/kernel/fs/affs/super.c index 5b50c4ca4..f90c53570 100644 --- a/kernel/fs/affs/super.c +++ b/kernel/fs/affs/super.c @@ -528,7 +528,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); @@ -546,7 +546,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; |