aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/sched.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 04:02:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:22 -0400
commit667471386d4068e75a6a55b615701ced61eb6333 (patch)
tree2bf51dfa6209ca6637c1cff084b15c132b280ab0 /arch/powerpc/platforms/cell/spufs/sched.c
parent6f1c86ec315711d21666751b0bdae69ce2c6d589 (diff)
powerpc: use non-racy method for proc entries creation
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/sched.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 00528ef84ad2..45dcd2693502 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1063,10 +1063,9 @@ int __init spu_sched_init(void)
1063 1063
1064 mod_timer(&spuloadavg_timer, 0); 1064 mod_timer(&spuloadavg_timer, 0);
1065 1065
1066 entry = create_proc_entry("spu_loadavg", 0, NULL); 1066 entry = proc_create("spu_loadavg", 0, NULL, &spu_loadavg_fops);
1067 if (!entry) 1067 if (!entry)
1068 goto out_stop_kthread; 1068 goto out_stop_kthread;
1069 entry->proc_fops = &spu_loadavg_fops;
1070 1069
1071 pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n", 1070 pr_debug("spusched: tick: %d, min ticks: %d, default ticks: %d\n",
1072 SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE); 1071 SPUSCHED_TICK, MIN_SPU_TIMESLICE, DEF_SPU_TIMESLICE);