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);
*flags |= MS_NOATIME;
if (!(o = parse_opts(data, &uid, &gid, &umask, &lowercase, &conv,
&eas, &chk, &errs, &chkdsk, ×hift))) {
printk("HPFS: bad mount options.\n");
- return 1;
+ goto out_err;
}
if (o == 2) {
hpfs_help();
- return 1;
+ goto out_err;
}
if (timeshift != sbi->sb_timeshift) {
printk("HPFS: timeshift can't be changed using remount.\n");
- return 1;
+ goto out_err;
}
unmark_dirty(s);
if (!(*flags & MS_RDONLY)) mark_dirty(s);
+ kfree(s->s_options);
+ s->s_options = new_opts;
+
return 0;
+
+out_err:
+ kfree(new_opts);
+ return -EINVAL;
}
/* Super operations */
.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)
int o;
+ save_mount_options(s, options);
+
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
return -ENOMEM;