--- zzzz-none-000/linux-2.6.19.2/fs/dlm/lockspace.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/fs/dlm/lockspace.c 2007-01-11 07:38:19.000000000 +0000 @@ -43,10 +43,6 @@ ssize_t ret = len; int n = simple_strtol(buf, NULL, 0); - ls = dlm_find_lockspace_local(ls->ls_local_handle); - if (!ls) - return -EINVAL; - switch (n) { case 0: dlm_ls_stop(ls); @@ -57,7 +53,6 @@ default: ret = -EINVAL; } - dlm_put_lockspace(ls); return ret; } @@ -148,12 +143,6 @@ return a->store ? a->store(ls, buf, len) : len; } -static void lockspace_kobj_release(struct kobject *k) -{ - struct dlm_ls *ls = container_of(k, struct dlm_ls, ls_kobj); - kfree(ls); -} - static struct sysfs_ops dlm_attr_ops = { .show = dlm_attr_show, .store = dlm_attr_store, @@ -162,7 +151,6 @@ static struct kobj_type dlm_ktype = { .default_attrs = dlm_attrs, .sysfs_ops = &dlm_attr_ops, - .release = lockspace_kobj_release, }; static struct kset dlm_kset = { @@ -690,7 +678,7 @@ dlm_clear_members_gone(ls); kfree(ls->ls_node_array); kobject_unregister(&ls->ls_kobj); - /* The ls structure will be freed when the kobject is done with */ + kfree(ls); mutex_lock(&ls_lock); ls_count--;