Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84797
b: refs/heads/master
c: 6d9c1fd
h: refs/heads/master
i:
  84795: 74d0c68
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Feb 8, 2008
1 parent 3aca466 commit 1638e97
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd2cc4dff3b08ab54c4c177a080046bcc84ac41d
refs/heads/master: 6d9c1fd425e6e1f0998218104cc046589e3af3d8
17 changes: 14 additions & 3 deletions trunk/fs/hpfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
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;

Expand All @@ -398,15 +399,15 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
if (!(o = parse_opts(data, &uid, &gid, &umask, &lowercase, &conv,
&eas, &chk, &errs, &chkdsk, &timeshift))) {
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);
Expand All @@ -419,7 +420,14 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)

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 */
Expand All @@ -432,6 +440,7 @@ static const struct super_operations hpfs_sops =
.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)
Expand All @@ -454,6 +463,8 @@ 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;
Expand Down

0 comments on commit 1638e97

Please sign in to comment.