Add a .show_options super operation to hpfs.
Use generic_show_options() and save the complete option string in
hpfs_fill_super() and hpfs_remount_fs().
Also add a small fix: hpfs_remount_fs() should return -EINVAL on
error, instead of 1, which is not an error value.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
int lowercase, conv, eas, chk, errs, chkdsk, timeshift;
int o;
struct hpfs_sb_info *sbi = hpfs_sb(s);
int lowercase, conv, eas, chk, errs, chkdsk, timeshift;
int o;
struct hpfs_sb_info *sbi = hpfs_sb(s);
+ char *new_opts = kstrdup(data, GFP_KERNEL);
if (!(o = parse_opts(data, &uid, &gid, &umask, &lowercase, &conv,
&eas, &chk, &errs, &chkdsk, ×hift))) {
printk("HPFS: bad mount options.\n");
if (!(o = parse_opts(data, &uid, &gid, &umask, &lowercase, &conv,
&eas, &chk, &errs, &chkdsk, ×hift))) {
printk("HPFS: bad mount options.\n");
}
if (o == 2) {
hpfs_help();
}
if (o == 2) {
hpfs_help();
}
if (timeshift != sbi->sb_timeshift) {
printk("HPFS: timeshift can't be changed using remount.\n");
}
if (timeshift != sbi->sb_timeshift) {
printk("HPFS: timeshift can't be changed using remount.\n");
if (!(*flags & MS_RDONLY)) mark_dirty(s);
if (!(*flags & MS_RDONLY)) mark_dirty(s);
+ kfree(s->s_options);
+ s->s_options = new_opts;
+
+
+out_err:
+ kfree(new_opts);
+ return -EINVAL;
.put_super = hpfs_put_super,
.statfs = hpfs_statfs,
.remount_fs = hpfs_remount_fs,
.put_super = hpfs_put_super,
.statfs = hpfs_statfs,
.remount_fs = hpfs_remount_fs,
+ .show_options = generic_show_options,
};
static int hpfs_fill_super(struct super_block *s, void *options, int silent)
};
static int hpfs_fill_super(struct super_block *s, void *options, int silent)
+ save_mount_options(s, options);
+
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
return -ENOMEM;
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
return -ENOMEM;