aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/configfs/mount.c2
-rw-r--r--fs/debugfs/inode.c2
-rw-r--r--fs/dlm/lockspace.c2
-rw-r--r--fs/gfs2/locking/dlm/sysfs.c2
-rw-r--r--include/linux/kobject.h4
-rw-r--r--kernel/ksysfs.c18
-rw-r--r--kernel/user.c2
-rw-r--r--mm/slub.c3
-rw-r--r--security/inode.c2
9 files changed, 18 insertions, 19 deletions
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c
index c4ee7f05de8b..54bf0db0d4b0 100644
--- a/fs/configfs/mount.c
+++ b/fs/configfs/mount.c
@@ -140,7 +140,7 @@ static int __init configfs_init(void)
140 if (!configfs_dir_cachep) 140 if (!configfs_dir_cachep)
141 goto out; 141 goto out;
142 142
143 config_kobj = kobject_create_and_add("config", &kernel_kset->kobj); 143 config_kobj = kobject_create_and_add("config", kernel_kobj);
144 if (!config_kobj) { 144 if (!config_kobj) {
145 kmem_cache_destroy(configfs_dir_cachep); 145 kmem_cache_destroy(configfs_dir_cachep);
146 configfs_dir_cachep = NULL; 146 configfs_dir_cachep = NULL;
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 5ce92c3d3b59..97f6381c36c2 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -432,7 +432,7 @@ static int __init debugfs_init(void)
432{ 432{
433 int retval; 433 int retval;
434 434
435 debug_kobj = kobject_create_and_add("debug", &kernel_kset->kobj); 435 debug_kobj = kobject_create_and_add("debug", kernel_kobj);
436 if (!debug_kobj) 436 if (!debug_kobj)
437 return -EINVAL; 437 return -EINVAL;
438 438
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 0828beb2d35d..e64b0dc664f3 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -223,7 +223,7 @@ int dlm_lockspace_init(void)
223 INIT_LIST_HEAD(&lslist); 223 INIT_LIST_HEAD(&lslist);
224 spin_lock_init(&lslist_lock); 224 spin_lock_init(&lslist_lock);
225 225
226 dlm_kset = kset_create_and_add("dlm", NULL, &kernel_kset->kobj); 226 dlm_kset = kset_create_and_add("dlm", NULL, kernel_kobj);
227 if (!dlm_kset) { 227 if (!dlm_kset) {
228 printk(KERN_WARNING "%s: can not create kset\n", __FUNCTION__); 228 printk(KERN_WARNING "%s: can not create kset\n", __FUNCTION__);
229 return -ENOMEM; 229 return -ENOMEM;
diff --git a/fs/gfs2/locking/dlm/sysfs.c b/fs/gfs2/locking/dlm/sysfs.c
index 1a92b6f7bc10..e5a4fbf7265f 100644
--- a/fs/gfs2/locking/dlm/sysfs.c
+++ b/fs/gfs2/locking/dlm/sysfs.c
@@ -219,7 +219,7 @@ void gdlm_kobject_release(struct gdlm_ls *ls)
219 219
220int gdlm_sysfs_init(void) 220int gdlm_sysfs_init(void)
221{ 221{
222 gdlm_kset = kset_create_and_add("lock_dlm", NULL, &kernel_kset->kobj); 222 gdlm_kset = kset_create_and_add("lock_dlm", NULL, kernel_kobj);
223 if (!gdlm_kset) { 223 if (!gdlm_kset) {
224 printk(KERN_WARNING "%s: can not create kset\n", __FUNCTION__); 224 printk(KERN_WARNING "%s: can not create kset\n", __FUNCTION__);
225 return -ENOMEM; 225 return -ENOMEM;
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 9da3523e4a65..0930efdcc094 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -198,8 +198,8 @@ extern struct kobject * kset_find_obj(struct kset *, const char *);
198#define set_kset_name(str) .kset = { .kobj = { .k_name = str } } 198#define set_kset_name(str) .kset = { .kobj = { .k_name = str } }
199 199
200 200
201/* The global /sys/kernel/ kset for people to chain off of */ 201/* The global /sys/kernel/ kobject for people to chain off of */
202extern struct kset *kernel_kset; 202extern struct kobject *kernel_kobj;
203/* The global /sys/hypervisor/ kobject for people to chain off of */ 203/* The global /sys/hypervisor/ kobject for people to chain off of */
204extern struct kobject *hypervisor_kobj; 204extern struct kobject *hypervisor_kobj;
205/* The global /sys/power/ kset for people to chain off of */ 205/* The global /sys/power/ kset for people to chain off of */
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 45e646585605..1081aff5fb9e 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -101,8 +101,8 @@ static struct bin_attribute notes_attr = {
101 .read = &notes_read, 101 .read = &notes_read,
102}; 102};
103 103
104struct kset *kernel_kset; 104struct kobject *kernel_kobj;
105EXPORT_SYMBOL_GPL(kernel_kset); 105EXPORT_SYMBOL_GPL(kernel_kobj);
106 106
107static struct attribute * kernel_attrs[] = { 107static struct attribute * kernel_attrs[] = {
108#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) 108#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET)
@@ -125,18 +125,18 @@ static int __init ksysfs_init(void)
125{ 125{
126 int error; 126 int error;
127 127
128 kernel_kset = kset_create_and_add("kernel", NULL, NULL); 128 kernel_kobj = kobject_create_and_add("kernel", NULL);
129 if (!kernel_kset) { 129 if (!kernel_kobj) {
130 error = -ENOMEM; 130 error = -ENOMEM;
131 goto exit; 131 goto exit;
132 } 132 }
133 error = sysfs_create_group(&kernel_kset->kobj, &kernel_attr_group); 133 error = sysfs_create_group(kernel_kobj, &kernel_attr_group);
134 if (error) 134 if (error)
135 goto kset_exit; 135 goto kset_exit;
136 136
137 if (notes_size > 0) { 137 if (notes_size > 0) {
138 notes_attr.size = notes_size; 138 notes_attr.size = notes_size;
139 error = sysfs_create_bin_file(&kernel_kset->kobj, &notes_attr); 139 error = sysfs_create_bin_file(kernel_kobj, &notes_attr);
140 if (error) 140 if (error)
141 goto group_exit; 141 goto group_exit;
142 } 142 }
@@ -150,11 +150,11 @@ static int __init ksysfs_init(void)
150 150
151notes_exit: 151notes_exit:
152 if (notes_size > 0) 152 if (notes_size > 0)
153 sysfs_remove_bin_file(&kernel_kset->kobj, &notes_attr); 153 sysfs_remove_bin_file(kernel_kobj, &notes_attr);
154group_exit: 154group_exit:
155 sysfs_remove_group(&kernel_kset->kobj, &kernel_attr_group); 155 sysfs_remove_group(kernel_kobj, &kernel_attr_group);
156kset_exit: 156kset_exit:
157 kset_unregister(kernel_kset); 157 kobject_unregister(kernel_kobj);
158exit: 158exit:
159 return error; 159 return error;
160} 160}
diff --git a/kernel/user.c b/kernel/user.c
index 5a106f3fdf05..7f17e6e8fd65 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -201,7 +201,7 @@ done:
201 */ 201 */
202int __init uids_sysfs_init(void) 202int __init uids_sysfs_init(void)
203{ 203{
204 uids_kset = kset_create_and_add("uids", NULL, &kernel_kset->kobj); 204 uids_kset = kset_create_and_add("uids", NULL, kernel_kobj);
205 if (!uids_kset) 205 if (!uids_kset)
206 return -ENOMEM; 206 return -ENOMEM;
207 207
diff --git a/mm/slub.c b/mm/slub.c
index b6c79462157e..d26177fb293b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4091,8 +4091,7 @@ static int __init slab_sysfs_init(void)
4091 struct kmem_cache *s; 4091 struct kmem_cache *s;
4092 int err; 4092 int err;
4093 4093
4094 slab_kset = kset_create_and_add("slab", &slab_uevent_ops, 4094 slab_kset = kset_create_and_add("slab", &slab_uevent_ops, kernel_kobj);
4095 &kernel_kset->kobj);
4096 if (!slab_kset) { 4095 if (!slab_kset) {
4097 printk(KERN_ERR "Cannot register slab subsystem.\n"); 4096 printk(KERN_ERR "Cannot register slab subsystem.\n");
4098 return -ENOSYS; 4097 return -ENOSYS;
diff --git a/security/inode.c b/security/inode.c
index dbe040ac0549..def0cc1b07f2 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -321,7 +321,7 @@ static int __init securityfs_init(void)
321{ 321{
322 int retval; 322 int retval;
323 323
324 security_kobj = kobject_create_and_add("security", &kernel_kset->kobj); 324 security_kobj = kobject_create_and_add("security", kernel_kobj);
325 if (!security_kobj) 325 if (!security_kobj)
326 return -EINVAL; 326 return -EINVAL;
327 327