[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1207653576-12640-8-git-send-email-den@openvz.org>
Date: Tue, 8 Apr 2008 15:19:15 +0400
From: "Denis V. Lunev" <den@...nvz.org>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, "Denis V. Lunev" <den@...nvz.org>
Subject: [PATCH 8/29] proc: use non-racy method for /proc/page_owner 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@...nvz.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists