aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r--fs/gfs2/sys.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index 67ba5b7b759b..298bcb6c2713 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -461,11 +461,25 @@ void gfs2_sys_fs_del(struct gfs2_sbd *sdp)
461 kobject_put(&sdp->sd_kobj); 461 kobject_put(&sdp->sd_kobj);
462} 462}
463 463
464static int gfs2_uevent(struct kset *kset, struct kobject *kobj,
465 struct kobj_uevent_env *env)
466{
467 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj);
468 add_uevent_var(env, "LOCKTABLE=%s", sdp->sd_table_name);
469 add_uevent_var(env, "LOCKPROTO=%s", sdp->sd_proto_name);
470 return 0;
471}
472
473static struct kset_uevent_ops gfs2_uevent_ops = {
474 .uevent = gfs2_uevent,
475};
476
477
464int gfs2_sys_init(void) 478int gfs2_sys_init(void)
465{ 479{
466 gfs2_sys_margs = NULL; 480 gfs2_sys_margs = NULL;
467 spin_lock_init(&gfs2_sys_margs_lock); 481 spin_lock_init(&gfs2_sys_margs_lock);
468 gfs2_kset = kset_create_and_add("gfs2", NULL, fs_kobj); 482 gfs2_kset = kset_create_and_add("gfs2", &gfs2_uevent_ops, fs_kobj);
469 if (!gfs2_kset) 483 if (!gfs2_kset)
470 return -ENOMEM; 484 return -ENOMEM;
471 return 0; 485 return 0;