diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-17 20:54:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-25 05:40:26 +0100 |
commit | 901195ed7f4b2f30dc5a36271887939c5d7bfb9f (patch) | |
tree | 1d56af3b3484ba97a98e3649247da25ac289ec7b /fs/gfs2/locking | |
parent | Kobject: change net/bridge to use kobject_create_and_add (diff) | |
download | linux-901195ed7f4b2f30dc5a36271887939c5d7bfb9f.tar.xz linux-901195ed7f4b2f30dc5a36271887939c5d7bfb9f.zip |
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/locking')
-rw-r--r-- | fs/gfs2/locking/dlm/sysfs.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/gfs2/locking/dlm/sysfs.c b/fs/gfs2/locking/dlm/sysfs.c index e5a4fbf7265f..a7336b909c61 100644 --- a/fs/gfs2/locking/dlm/sysfs.c +++ b/fs/gfs2/locking/dlm/sysfs.c @@ -195,19 +195,12 @@ int gdlm_kobject_setup(struct gdlm_ls *ls, struct kobject *fskobj) { int error; - error = kobject_set_name(&ls->kobj, "%s", "lock_module"); - if (error) { - log_error("can't set kobj name %d", error); - return error; - } - ls->kobj.kset = gdlm_kset; - ls->kobj.ktype = &gdlm_ktype; - ls->kobj.parent = fskobj; - - error = kobject_register(&ls->kobj); + error = kobject_init_and_add(&ls->kobj, &gdlm_ktype, fskobj, + "lock_module"); if (error) log_error("can't register kobj %d", error); + kobject_uevent(&ls->kobj, KOBJ_ADD); return error; } |