summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/locking
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 15:54:39 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:26 -0800
commit901195ed7f4b2f30dc5a36271887939c5d7bfb9f (patch)
tree1d56af3b3484ba97a98e3649247da25ac289ec7b /fs/gfs2/locking
parent43b98c4a66760d18d4056beed4078a8dbad193cc (diff)
downloadop-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/locking')
-rw-r--r--fs/gfs2/locking/dlm/sysfs.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/gfs2/locking/dlm/sysfs.c b/fs/gfs2/locking/dlm/sysfs.c
index e5a4fbf..a7336b9 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;
}
OpenPOWER on IntegriCloud