diff options
Diffstat (limited to 'fs/affs/super.c')
-rw-r--r-- | fs/affs/super.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c index 3c45d49c0d26..d2dc047cb479 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -122,6 +122,7 @@ static const struct super_operations affs_sops = { | |||
122 | .write_super = affs_write_super, | 122 | .write_super = affs_write_super, |
123 | .statfs = affs_statfs, | 123 | .statfs = affs_statfs, |
124 | .remount_fs = affs_remount, | 124 | .remount_fs = affs_remount, |
125 | .show_options = generic_show_options, | ||
125 | }; | 126 | }; |
126 | 127 | ||
127 | enum { | 128 | enum { |
@@ -272,6 +273,8 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent) | |||
272 | u8 sig[4]; | 273 | u8 sig[4]; |
273 | int ret = -EINVAL; | 274 | int ret = -EINVAL; |
274 | 275 | ||
276 | save_mount_options(sb, data); | ||
277 | |||
275 | pr_debug("AFFS: read_super(%s)\n",data ? (const char *)data : "no options"); | 278 | pr_debug("AFFS: read_super(%s)\n",data ? (const char *)data : "no options"); |
276 | 279 | ||
277 | sb->s_magic = AFFS_SUPER_MAGIC; | 280 | sb->s_magic = AFFS_SUPER_MAGIC; |
@@ -487,14 +490,21 @@ affs_remount(struct super_block *sb, int *flags, char *data) | |||
487 | int root_block; | 490 | int root_block; |
488 | unsigned long mount_flags; | 491 | unsigned long mount_flags; |
489 | int res = 0; | 492 | int res = 0; |
493 | char *new_opts = kstrdup(data, GFP_KERNEL); | ||
490 | 494 | ||
491 | pr_debug("AFFS: remount(flags=0x%x,opts=\"%s\")\n",*flags,data); | 495 | pr_debug("AFFS: remount(flags=0x%x,opts=\"%s\")\n",*flags,data); |
492 | 496 | ||
493 | *flags |= MS_NODIRATIME; | 497 | *flags |= MS_NODIRATIME; |
494 | 498 | ||
495 | if (!parse_options(data,&uid,&gid,&mode,&reserved,&root_block, | 499 | if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block, |
496 | &blocksize,&sbi->s_prefix,sbi->s_volume,&mount_flags)) | 500 | &blocksize, &sbi->s_prefix, sbi->s_volume, |
501 | &mount_flags)) { | ||
502 | kfree(new_opts); | ||
497 | return -EINVAL; | 503 | return -EINVAL; |
504 | } | ||
505 | kfree(sb->s_options); | ||
506 | sb->s_options = new_opts; | ||
507 | |||
498 | sbi->s_flags = mount_flags; | 508 | sbi->s_flags = mount_flags; |
499 | sbi->s_mode = mode; | 509 | sbi->s_mode = mode; |
500 | sbi->s_uid = uid; | 510 | sbi->s_uid = uid; |