Commit 53af8ee4 authored by Sukadev Bhattiprolu's avatar Sukadev Bhattiprolu Committed by Linus Torvalds

Extract option parsing to new function

Move code to parse mount options into a separate function so it can
(later) be shared between mount and remount operations.
Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 31af0abb
...@@ -72,11 +72,9 @@ static inline struct super_block *pts_sb_from_inode(struct inode *inode) ...@@ -72,11 +72,9 @@ static inline struct super_block *pts_sb_from_inode(struct inode *inode)
return devpts_mnt->mnt_sb; return devpts_mnt->mnt_sb;
} }
static int devpts_remount(struct super_block *sb, int *flags, char *data) static int parse_mount_options(char *data, struct pts_mount_opts *opts)
{ {
char *p; char *p;
struct pts_fs_info *fsi = DEVPTS_SB(sb);
struct pts_mount_opts *opts = &fsi->mount_opts;
opts->setuid = 0; opts->setuid = 0;
opts->setgid = 0; opts->setgid = 0;
...@@ -120,6 +118,14 @@ static int devpts_remount(struct super_block *sb, int *flags, char *data) ...@@ -120,6 +118,14 @@ static int devpts_remount(struct super_block *sb, int *flags, char *data)
return 0; return 0;
} }
static int devpts_remount(struct super_block *sb, int *flags, char *data)
{
struct pts_fs_info *fsi = DEVPTS_SB(sb);
struct pts_mount_opts *opts = &fsi->mount_opts;
return parse_mount_options(data, opts);
}
static int devpts_show_options(struct seq_file *seq, struct vfsmount *vfs) static int devpts_show_options(struct seq_file *seq, struct vfsmount *vfs)
{ {
struct pts_fs_info *fsi = DEVPTS_SB(vfs->mnt_sb); struct pts_fs_info *fsi = DEVPTS_SB(vfs->mnt_sb);
......
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