aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-02-08 07:21:36 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:39 -0500
commite9b3961b66bb1e93762895d809be074ea109c77c (patch)
tree32a84603c2502106a49d5d4ed3d9e5b1da687508 /fs
parente11400b0cadc97cb1062912c1028e965c93fa9b3 (diff)
mount options: fix affs
Add a .show_options super operation to affs. Use generic_show_options() and save the complete option string in affs_fill_super() and affs_remount(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/affs/super.c14
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
127enum { 128enum {
@@ -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;