aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/hpfs/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 458cf463047b..46ad0ef8b4cc 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -455,7 +455,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
455 struct hpfs_sb_info *sbi = hpfs_sb(s); 455 struct hpfs_sb_info *sbi = hpfs_sb(s);
456 char *new_opts = kstrdup(data, GFP_KERNEL); 456 char *new_opts = kstrdup(data, GFP_KERNEL);
457 457
458 if (!new_opts) 458 if (data && !new_opts)
459 return -ENOMEM; 459 return -ENOMEM;
460 460
461 sync_filesystem(s); 461 sync_filesystem(s);
@@ -493,7 +493,8 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
493 493
494 if (!(*flags & MS_RDONLY)) mark_dirty(s, 1); 494 if (!(*flags & MS_RDONLY)) mark_dirty(s, 1);
495 495
496 replace_mount_options(s, new_opts); 496 if (new_opts)
497 replace_mount_options(s, new_opts);
497 498
498 hpfs_unlock(s); 499 hpfs_unlock(s);
499 return 0; 500 return 0;