Commit e55e212c authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Linus Torvalds

mount options: fix capifs

Add a .show_options super operation to capifs.

Use generic_show_options() and save the complete option string in
capifs_remount().
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Acked-by: default avatarKarsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 552c3c6c
...@@ -52,6 +52,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data) ...@@ -52,6 +52,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data)
gid_t gid = 0; gid_t gid = 0;
umode_t mode = 0600; umode_t mode = 0600;
char *this_char; char *this_char;
char *new_opt = kstrdup(data, GFP_KERNEL);
this_char = NULL; this_char = NULL;
while ((this_char = strsep(&data, ",")) != NULL) { while ((this_char = strsep(&data, ",")) != NULL) {
...@@ -72,11 +73,16 @@ static int capifs_remount(struct super_block *s, int *flags, char *data) ...@@ -72,11 +73,16 @@ static int capifs_remount(struct super_block *s, int *flags, char *data)
return -EINVAL; return -EINVAL;
} }
} }
kfree(s->s_options);
s->s_options = new_opt;
config.setuid = setuid; config.setuid = setuid;
config.setgid = setgid; config.setgid = setgid;
config.uid = uid; config.uid = uid;
config.gid = gid; config.gid = gid;
config.mode = mode; config.mode = mode;
return 0; return 0;
} }
...@@ -84,6 +90,7 @@ static struct super_operations capifs_sops = ...@@ -84,6 +90,7 @@ static struct super_operations capifs_sops =
{ {
.statfs = simple_statfs, .statfs = simple_statfs,
.remount_fs = capifs_remount, .remount_fs = capifs_remount,
.show_options = generic_show_options,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment