From foo@baz Tue Apr 9 12:12:43 2002 Date: Thu, 29 Nov 2007 22:38:12 -0800 To: Greg KH From: Greg Kroah-Hartman Subject: kobject: change /sys/kernel/uids to not use a kset A kset is not needed for the uids kobjects, so switch to using a kobject instead. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- kernel/user.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/kernel/user.c +++ b/kernel/user.c @@ -115,7 +115,9 @@ static void sched_switch_user(struct tas #if defined(CONFIG_FAIR_USER_SCHED) && defined(CONFIG_SYSFS) -static struct kset *uids_kset; /* represents the /sys/kernel/uids/ directory */ +/* represents the /sys/kernel/uids/ directory */ +static struct kobject *uids_kobj; + static DEFINE_MUTEX(uids_mutex); static inline void uids_mutex_lock(void) @@ -182,7 +184,7 @@ static int uids_user_create(struct user_ memset(kobj, 0, sizeof(struct kobject)); kobj->ktype = &uids_ktype; - kobj->kset = uids_kset; + kobj->parent = uids_kobj; kobject_init(kobj); kobject_set_name(&up->kobj, "%d", up->uid); error = kobject_add(kobj); @@ -201,8 +203,8 @@ done: */ int __init uids_sysfs_init(void) { - uids_kset = kset_create_and_register("uids", NULL, kernel_kobj); - if (!uids_kset) + uids_kobj = kobject_create_and_register("uids", kernel_kobj); + if (!uids_kobj) return -ENOMEM; return uids_user_create(&root_user);