diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-17 15:54:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 20:40:26 -0800 |
commit | 901195ed7f4b2f30dc5a36271887939c5d7bfb9f (patch) | |
tree | 1d56af3b3484ba97a98e3649247da25ac289ec7b /fs/gfs2/sys.c | |
parent | 43b98c4a66760d18d4056beed4078a8dbad193cc (diff) | |
download | op-kernel-dev-901195ed7f4b2f30dc5a36271887939c5d7bfb9f.zip op-kernel-dev-901195ed7f4b2f30dc5a36271887939c5d7bfb9f.tar.gz |
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.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 44cfaae..8d9cd5b 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -494,13 +494,8 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp) int error; sdp->sd_kobj.kset = gfs2_kset; - sdp->sd_kobj.ktype = &gfs2_ktype; - - error = kobject_set_name(&sdp->sd_kobj, "%s", sdp->sd_table_name); - if (error) - goto fail; - - error = kobject_register(&sdp->sd_kobj); + error = kobject_init_and_add(&sdp->sd_kobj, &gfs2_ktype, NULL, + "%s", sdp->sd_table_name); if (error) goto fail; @@ -520,6 +515,7 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp) if (error) goto fail_args; + kobject_uevent(&sdp->sd_kobj, KOBJ_ADD); return 0; fail_args: |