aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/sys.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 14:54:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:26 -0500
commit901195ed7f4b2f30dc5a36271887939c5d7bfb9f (patch)
tree1d56af3b3484ba97a98e3649247da25ac289ec7b /fs/gfs2/sys.c
parent43b98c4a66760d18d4056beed4078a8dbad193cc (diff)
Kobject: change GFS2 to use kobject_init_and_add
Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r--fs/gfs2/sys.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index 44cfaae92e7..8d9cd5bd584 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -494,13 +494,8 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
494 int error; 494 int error;
495 495
496 sdp->sd_kobj.kset = gfs2_kset; 496 sdp->sd_kobj.kset = gfs2_kset;
497 sdp->sd_kobj.ktype = &gfs2_ktype; 497 error = kobject_init_and_add(&sdp->sd_kobj, &gfs2_ktype, NULL,
498 498 "%s", sdp->sd_table_name);
499 error = kobject_set_name(&sdp->sd_kobj, "%s", sdp->sd_table_name);
500 if (error)
501 goto fail;
502
503 error = kobject_register(&sdp->sd_kobj);
504 if (error) 499 if (error)
505 goto fail; 500 goto fail;
506 501
@@ -520,6 +515,7 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
520 if (error) 515 if (error)
521 goto fail_args; 516 goto fail_args;
522 517
518 kobject_uevent(&sdp->sd_kobj, KOBJ_ADD);
523 return 0; 519 return 0;
524 520
525fail_args: 521fail_args: