diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-07-09 10:43:49 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-07-09 10:43:49 +0200 |
commit | 52e31f89cc40c613b22e62108fe12b27433a888e (patch) | |
tree | c3cd45d6950706c32efdd341715e70b6ee6d7a5e /fs/reiserfs/super.c | |
parent | 9a7e7b571826c4399aa639af4a670642d96d935c (diff) | |
parent | ee40fb2948fc99096836995d4f3ddcc0efbac790 (diff) | |
download | blackbird-op-linux-52e31f89cc40c613b22e62108fe12b27433a888e.tar.gz blackbird-op-linux-52e31f89cc40c613b22e62108fe12b27433a888e.zip |
Merge branch 'linus' into x86/asm, to pick up fixes before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index b8f2d1e8c645..c72c16c5a60f 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -1393,7 +1393,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) unsigned long safe_mask = 0; unsigned int commit_max_age = (unsigned int)-1; struct reiserfs_journal *journal = SB_JOURNAL(s); - char *new_opts = kstrdup(arg, GFP_KERNEL); + char *new_opts; int err; char *qf_names[REISERFS_MAXQUOTAS]; unsigned int qfmt = 0; @@ -1401,6 +1401,10 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) int i; #endif + new_opts = kstrdup(arg, GFP_KERNEL); + if (arg && !new_opts) + return -ENOMEM; + sync_filesystem(s); reiserfs_write_lock(s); @@ -1546,7 +1550,8 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) } out_ok_unlocked: - replace_mount_options(s, new_opts); + if (new_opts) + replace_mount_options(s, new_opts); return 0; out_err_unlock: |