Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181831
b: refs/heads/master
c: b4a5d4b
h: refs/heads/master
i:
  181829: 5d0df5a
  181827: ce7f85f
  181823: ae78cfa
v: v3
  • Loading branch information
Steven Whitehouse authored and David Teigland committed Feb 26, 2010
1 parent 5eb7544 commit 2e136b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf6620acc0f6fac57968aafef79ab372bdcf6157
refs/heads/master: b4a5d4bc377e49239374f266f0a0e2772c29749c
14 changes: 13 additions & 1 deletion trunk/fs/dlm/lockspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@ static int do_uevent(struct dlm_ls *ls, int in)
return error;
}

static int dlm_uevent(struct kset *kset, struct kobject *kobj,
struct kobj_uevent_env *env)
{
struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj);

add_uevent_var(env, "LOCKSPACE=%s", ls->ls_name);
return 0;
}

static struct kset_uevent_ops dlm_uevent_ops = {
.uevent = dlm_uevent,
};

int __init dlm_lockspace_init(void)
{
Expand All @@ -199,7 +211,7 @@ int __init dlm_lockspace_init(void)
INIT_LIST_HEAD(&lslist);
spin_lock_init(&lslist_lock);

dlm_kset = kset_create_and_add("dlm", NULL, kernel_kobj);
dlm_kset = kset_create_and_add("dlm", &dlm_uevent_ops, kernel_kobj);
if (!dlm_kset) {
printk(KERN_WARNING "%s: can not create kset\n", __func__);
return -ENOMEM;
Expand Down

0 comments on commit 2e136b9

Please sign in to comment.