[Devel] [RFC][PATCH 6/8]: Extract option parsing to new function
sukadev at us.ibm.com
sukadev at us.ibm.com
Wed Aug 20 19:28:36 PDT 2008
From: Sukadev Bhattiprolu <sukadev at us.ibm.com>
Subject: [RFC][PATCH 6/8]: 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.
---
fs/devpts/inode.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
Index: linux-2.6.26-rc8-mm1/fs/devpts/inode.c
===================================================================
--- linux-2.6.26-rc8-mm1.orig/fs/devpts/inode.c 2008-08-20 14:26:22.000000000 -0700
+++ linux-2.6.26-rc8-mm1/fs/devpts/inode.c 2008-08-20 14:28:39.000000000 -0700
@@ -71,11 +71,9 @@ static inline struct super_block *pts_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;
- struct pts_fs_info *fsi = DEVPTS_SB(sb);
- struct pts_mount_opts *opts = &fsi->mount_opts;
opts->setuid = 0;
opts->setgid = 0;
@@ -119,6 +117,14 @@ static int devpts_remount(struct super_b
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)
{
struct pts_fs_info *fsi = DEVPTS_SB(vfs->mnt_sb);
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list