diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-29 01:02:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 08:06:22 -0700 |
commit | c33fff0afbef4f0467c99e3f47ee7e98ae78c77e (patch) | |
tree | d6b5f8dc77aa21de95bbca76c6be6056026cc1d8 /kernel/configs.c | |
parent | ac41cfd19bf77424519b962f8205ede51fceaac6 (diff) | |
download | lwn-c33fff0afbef4f0467c99e3f47ee7e98ae78c77e.tar.gz lwn-c33fff0afbef4f0467c99e3f47ee7e98ae78c77e.zip |
kernel: 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: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/configs.c')
-rw-r--r-- | kernel/configs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/configs.c b/kernel/configs.c index d3a4b82a8a96..4c345210ed8c 100644 --- a/kernel/configs.c +++ b/kernel/configs.c @@ -79,11 +79,11 @@ static int __init ikconfig_init(void) struct proc_dir_entry *entry; /* create the current config file */ - entry = create_proc_entry("config.gz", S_IFREG | S_IRUGO, NULL); + entry = proc_create("config.gz", S_IFREG | S_IRUGO, NULL, + &ikconfig_file_ops); if (!entry) return -ENOMEM; - entry->proc_fops = &ikconfig_file_ops; entry->size = kernel_config_data_size; return 0; |