diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-13 01:06:28 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-13 01:06:28 -0500 |
commit | f43dc23d5ea91fca257be02138a255f02d98e806 (patch) | |
tree | b29722f6e965316e90ac97abf79923ced250dc21 /fs/proc/root.c | |
parent | f8e53553f452dcbf67cb89c8cba63a1cd6eb4cc0 (diff) | |
parent | 4162cf64973df51fc885825bc9ca4d055891c49f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into common/serial-rework
Conflicts:
arch/sh/kernel/cpu/sh2/setup-sh7619.c
arch/sh/kernel/cpu/sh2a/setup-mxg.c
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
arch/sh/kernel/cpu/sh3/setup-sh7705.c
arch/sh/kernel/cpu/sh3/setup-sh770x.c
arch/sh/kernel/cpu/sh3/setup-sh7710.c
arch/sh/kernel/cpu/sh3/setup-sh7720.c
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
arch/sh/kernel/cpu/sh4/setup-sh7750.c
arch/sh/kernel/cpu/sh4/setup-sh7760.c
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
arch/sh/kernel/cpu/sh4a/setup-shx3.c
arch/sh/kernel/cpu/sh5/setup-sh5.c
drivers/serial/sh-sci.c
drivers/serial/sh-sci.h
include/linux/serial_sci.h
Diffstat (limited to 'fs/proc/root.c')
-rw-r--r-- | fs/proc/root.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index b080b791d9e3..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 | ||
38 | static int proc_get_sb(struct file_system_type *fs_type, | 38 | static 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); |
@@ -79,11 +79,9 @@ static int proc_get_sb(struct file_system_type *fs_type, | |||
79 | } | 79 | } |
80 | 80 | ||
81 | sb->s_flags |= MS_ACTIVE; | 81 | sb->s_flags |= MS_ACTIVE; |
82 | ns->proc_mnt = mnt; | ||
83 | } | 82 | } |
84 | 83 | ||
85 | simple_set_mnt(mnt, sb); | 84 | return dget(sb->s_root); |
86 | return 0; | ||
87 | } | 85 | } |
88 | 86 | ||
89 | static void proc_kill_sb(struct super_block *sb) | 87 | static void proc_kill_sb(struct super_block *sb) |
@@ -97,7 +95,7 @@ static void proc_kill_sb(struct super_block *sb) | |||
97 | 95 | ||
98 | static struct file_system_type proc_fs_type = { | 96 | static struct file_system_type proc_fs_type = { |
99 | .name = "proc", | 97 | .name = "proc", |
100 | .get_sb = proc_get_sb, | 98 | .mount = proc_mount, |
101 | .kill_sb = proc_kill_sb, | 99 | .kill_sb = proc_kill_sb, |
102 | }; | 100 | }; |
103 | 101 | ||
@@ -110,12 +108,12 @@ void __init proc_root_init(void) | |||
110 | if (err) | 108 | if (err) |
111 | return; | 109 | return; |
112 | proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns); | 110 | proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns); |
113 | err = PTR_ERR(proc_mnt); | ||
114 | if (IS_ERR(proc_mnt)) { | 111 | if (IS_ERR(proc_mnt)) { |
115 | unregister_filesystem(&proc_fs_type); | 112 | unregister_filesystem(&proc_fs_type); |
116 | return; | 113 | return; |
117 | } | 114 | } |
118 | 115 | ||
116 | init_pid_ns.proc_mnt = proc_mnt; | ||
119 | proc_symlink("mounts", NULL, "self/mounts"); | 117 | proc_symlink("mounts", NULL, "self/mounts"); |
120 | 118 | ||
121 | proc_net_init(); | 119 | proc_net_init(); |
@@ -180,6 +178,7 @@ static int proc_root_readdir(struct file * filp, | |||
180 | static const struct file_operations proc_root_operations = { | 178 | static const struct file_operations proc_root_operations = { |
181 | .read = generic_read_dir, | 179 | .read = generic_read_dir, |
182 | .readdir = proc_root_readdir, | 180 | .readdir = proc_root_readdir, |
181 | .llseek = default_llseek, | ||
183 | }; | 182 | }; |
184 | 183 | ||
185 | /* | 184 | /* |
@@ -213,6 +212,7 @@ int pid_ns_prepare_proc(struct pid_namespace *ns) | |||
213 | if (IS_ERR(mnt)) | 212 | if (IS_ERR(mnt)) |
214 | return PTR_ERR(mnt); | 213 | return PTR_ERR(mnt); |
215 | 214 | ||
215 | ns->proc_mnt = mnt; | ||
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
@@ -220,9 +220,3 @@ void pid_ns_release_proc(struct pid_namespace *ns) | |||
220 | { | 220 | { |
221 | mntput(ns->proc_mnt); | 221 | mntput(ns->proc_mnt); |
222 | } | 222 | } |
223 | |||
224 | EXPORT_SYMBOL(proc_symlink); | ||
225 | EXPORT_SYMBOL(proc_mkdir); | ||
226 | EXPORT_SYMBOL(create_proc_entry); | ||
227 | EXPORT_SYMBOL(proc_create_data); | ||
228 | EXPORT_SYMBOL(remove_proc_entry); | ||