diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-29 04:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:22 -0400 |
commit | c7705f3449c7edd5c1744871097f93977227afc4 (patch) | |
tree | d2f121a4b1ae3ae458db76ec0210ea2172c31e5a /drivers/message/i2o | |
parent | 1b50221738108c438d5f25c7a043fb89e9e27044 (diff) |
drivers: use non-racy method for proc entries creation (2)
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: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Neil Brown <neilb@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r-- | drivers/message/i2o/i2o_proc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c index 6fdd072201f9..54a3016ff45d 100644 --- a/drivers/message/i2o/i2o_proc.c +++ b/drivers/message/i2o/i2o_proc.c | |||
@@ -1893,13 +1893,11 @@ static int i2o_proc_create_entries(struct proc_dir_entry *dir, | |||
1893 | struct proc_dir_entry *tmp; | 1893 | struct proc_dir_entry *tmp; |
1894 | 1894 | ||
1895 | while (i2o_pe->name) { | 1895 | while (i2o_pe->name) { |
1896 | tmp = create_proc_entry(i2o_pe->name, i2o_pe->mode, dir); | 1896 | tmp = proc_create_data(i2o_pe->name, i2o_pe->mode, dir, |
1897 | i2o_pe->fops, data); | ||
1897 | if (!tmp) | 1898 | if (!tmp) |
1898 | return -1; | 1899 | return -1; |
1899 | 1900 | ||
1900 | tmp->data = data; | ||
1901 | tmp->proc_fops = i2o_pe->fops; | ||
1902 | |||
1903 | i2o_pe++; | 1901 | i2o_pe++; |
1904 | } | 1902 | } |
1905 | 1903 | ||