summaryrefslogtreecommitdiff
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-04-29 01:00:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 08:06:09 -0700
commit46ae220bea40bd1cf4abec2d5cdfb4f9396c7115 (patch)
treee485a13dd8d85d2f40ecf73d9482671dc39ceab1 /kernel/cgroup.c
parent06a119204d3e1e67d393e996ed987b0df7998381 (diff)
downloadlwn-46ae220bea40bd1cf4abec2d5cdfb4f9396c7115.tar.gz
lwn-46ae220bea40bd1cf4abec2d5cdfb4f9396c7115.zip
cgroup: switch to proc_create()
There is a race between create_proc_entry() and the assignment of file ops. proc_create() is invented to fix it. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 97ab04c3fcf5..436e26f4d624 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2545,7 +2545,6 @@ int __init cgroup_init(void)
{
int err;
int i;
- struct proc_dir_entry *entry;
err = bdi_init(&cgroup_backing_dev_info);
if (err)
@@ -2561,9 +2560,7 @@ int __init cgroup_init(void)
if (err < 0)
goto out;
- entry = create_proc_entry("cgroups", 0, NULL);
- if (entry)
- entry->proc_fops = &proc_cgroupstats_operations;
+ proc_create("cgroups", 0, NULL, &proc_cgroupstats_operations);
out:
if (err)