aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 04:02:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:22 -0400
commitc7705f3449c7edd5c1744871097f93977227afc4 (patch)
treed2f121a4b1ae3ae458db76ec0210ea2172c31e5a /drivers/md
parent1b50221738108c438d5f25c7a043fb89e9e27044 (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/md')
-rw-r--r--drivers/md/md.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 87620b705bee..6fe4a769c854 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5947,13 +5947,9 @@ static struct notifier_block md_notifier = {
5947 5947
5948static void md_geninit(void) 5948static void md_geninit(void)
5949{ 5949{
5950 struct proc_dir_entry *p;
5951
5952 dprintk("md: sizeof(mdp_super_t) = %d\n", (int)sizeof(mdp_super_t)); 5950 dprintk("md: sizeof(mdp_super_t) = %d\n", (int)sizeof(mdp_super_t));
5953 5951
5954 p = create_proc_entry("mdstat", S_IRUGO, NULL); 5952 proc_create("mdstat", S_IRUGO, NULL, &md_seq_fops);
5955 if (p)
5956 p->proc_fops = &md_seq_fops;
5957} 5953}
5958 5954
5959static int __init md_init(void) 5955static int __init md_init(void)