summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/salinfo.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 10:02:25 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 17:06:21 +0200
commite23637681bef5b69a68c8ac399732b941f1af023 (patch)
tree90cc355ac83b58080da3213b99351717d9f0ffb6 /arch/ia64/kernel/salinfo.c
parentcris: use non-racy method for /proc/system_profile creation (diff)
downloadlinux-e23637681bef5b69a68c8ac399732b941f1af023.tar.xz
linux-e23637681bef5b69a68c8ac399732b941f1af023.zip
ia64: 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. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Tony Luck <tony.luck@intel.com> 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/ia64/kernel/salinfo.c')
-rw-r--r--arch/ia64/kernel/salinfo.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index b11bb50a197a..ecb9eb78d687 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -648,18 +648,16 @@ salinfo_init(void)
if (!dir)
continue;
- entry = create_proc_entry("event", S_IRUSR, dir);
+ entry = proc_create_data("event", S_IRUSR, dir,
+ &salinfo_event_fops, data);
if (!entry)
continue;
- entry->data = data;
- entry->proc_fops = &salinfo_event_fops;
*sdir++ = entry;
- entry = create_proc_entry("data", S_IRUSR | S_IWUSR, dir);
+ entry = proc_create_data("data", S_IRUSR | S_IWUSR, dir,
+ &salinfo_data_fops, data);
if (!entry)
continue;
- entry->data = data;
- entry->proc_fops = &salinfo_data_fops;
*sdir++ = entry;
/* we missed any events before now */