lkml.org 
[lkml]   [2008]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 8/29] proc: use non-racy method for /proc/page_owner creation
Date
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>
---
fs/proc/proc_misc.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 0390844..fbaf067 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -1041,12 +1041,10 @@ void __init proc_misc_init(void)
#ifdef CONFIG_PAGE_OWNER
{
struct proc_dir_entry *entry;
- entry = create_proc_entry("page_owner",
- S_IWUSR | S_IRUGO, NULL);
- if (entry) {
- entry->proc_fops = &proc_page_owner_operations;
+ entry = proc_create("page_owner",
+ S_IWUSR | S_IRUGO, NULL, &proc_page_owner_operations);
+ if (entry)
entry->size = 1024;
- }
}
#endif
}
--
1.5.3.rc5


\
 
 \ /
  Last update: 2008-04-08 13:23    [W:0.142 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site