aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/root.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-07-26 05:12:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-29 04:17:01 -0400
commitaed1d84f98738bcc1c605e1ff442de9890441315 (patch)
tree30fd177f50289b5daa621c0e2922b9942bdff0f5 /fs/proc/root.c
parent579441a39bbbbc408acd5b228d63e76cff708fe6 (diff)
switch procfs to ->mount()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/root.c')
-rw-r--r--fs/proc/root.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 03b4f6fe4984..ef9fa8e24ad6 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -35,8 +35,8 @@ static int proc_set_super(struct super_block *sb, void *data)
35 return set_anon_super(sb, NULL); 35 return set_anon_super(sb, NULL);
36} 36}
37 37
38static int proc_get_sb(struct file_system_type *fs_type, 38static struct dentry *proc_mount(struct file_system_type *fs_type,
39 int flags, const char *dev_name, void *data, struct vfsmount *mnt) 39 int flags, const char *dev_name, void *data)
40{ 40{
41 int err; 41 int err;
42 struct super_block *sb; 42 struct super_block *sb;
@@ -61,14 +61,14 @@ static int proc_get_sb(struct file_system_type *fs_type,
61 61
62 sb = sget(fs_type, proc_test_super, proc_set_super, ns); 62 sb = sget(fs_type, proc_test_super, proc_set_super, ns);
63 if (IS_ERR(sb)) 63 if (IS_ERR(sb))
64 return PTR_ERR(sb); 64 return ERR_CAST(sb);
65 65
66 if (!sb->s_root) { 66 if (!sb->s_root) {
67 sb->s_flags = flags; 67 sb->s_flags = flags;
68 err = proc_fill_super(sb); 68 err = proc_fill_super(sb);
69 if (err) { 69 if (err) {
70 deactivate_locked_super(sb); 70 deactivate_locked_super(sb);
71 return err; 71 return ERR_PTR(err);
72 } 72 }
73 73
74 ei = PROC_I(sb->s_root->d_inode); 74 ei = PROC_I(sb->s_root->d_inode);
@@ -81,8 +81,7 @@ static int proc_get_sb(struct file_system_type *fs_type,
81 sb->s_flags |= MS_ACTIVE; 81 sb->s_flags |= MS_ACTIVE;
82 } 82 }
83 83
84 simple_set_mnt(mnt, sb); 84 return dget(sb->s_root);
85 return 0;
86} 85}
87 86
88static void proc_kill_sb(struct super_block *sb) 87static void proc_kill_sb(struct super_block *sb)
@@ -96,7 +95,7 @@ static void proc_kill_sb(struct super_block *sb)
96 95
97static struct file_system_type proc_fs_type = { 96static struct file_system_type proc_fs_type = {
98 .name = "proc", 97 .name = "proc",
99 .get_sb = proc_get_sb, 98 .mount = proc_mount,
100 .kill_sb = proc_kill_sb, 99 .kill_sb = proc_kill_sb,
101}; 100};
102 101