diff options
Diffstat (limited to 'fs/gfs2/locking/dlm/sysfs.c')
-rw-r--r-- | fs/gfs2/locking/dlm/sysfs.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/gfs2/locking/dlm/sysfs.c b/fs/gfs2/locking/dlm/sysfs.c index 4ec571c3d8a9..9b7edcf7bd49 100644 --- a/fs/gfs2/locking/dlm/sysfs.c +++ b/fs/gfs2/locking/dlm/sysfs.c | |||
@@ -195,9 +195,23 @@ void gdlm_kobject_release(struct gdlm_ls *ls) | |||
195 | kobject_put(&ls->kobj); | 195 | kobject_put(&ls->kobj); |
196 | } | 196 | } |
197 | 197 | ||
198 | static int gdlm_uevent(struct kset *kset, struct kobject *kobj, | ||
199 | struct kobj_uevent_env *env) | ||
200 | { | ||
201 | struct gdlm_ls *ls = container_of(kobj, struct gdlm_ls, kobj); | ||
202 | add_uevent_var(env, "LOCKTABLE=%s:%s", ls->clustername, ls->fsname); | ||
203 | add_uevent_var(env, "LOCKPROTO=lock_dlm"); | ||
204 | return 0; | ||
205 | } | ||
206 | |||
207 | static struct kset_uevent_ops gdlm_uevent_ops = { | ||
208 | .uevent = gdlm_uevent, | ||
209 | }; | ||
210 | |||
211 | |||
198 | int gdlm_sysfs_init(void) | 212 | int gdlm_sysfs_init(void) |
199 | { | 213 | { |
200 | gdlm_kset = kset_create_and_add("lock_dlm", NULL, kernel_kobj); | 214 | gdlm_kset = kset_create_and_add("lock_dlm", &gdlm_uevent_ops, kernel_kobj); |
201 | if (!gdlm_kset) { | 215 | if (!gdlm_kset) { |
202 | printk(KERN_WARNING "%s: can not create kset\n", __func__); | 216 | printk(KERN_WARNING "%s: can not create kset\n", __func__); |
203 | return -ENOMEM; | 217 | return -ENOMEM; |