fix struct user_info export's sysfs interaction
Clean up the use of ksets and kobjects. Kobjects are instances of objects (like struct user_info), ksets are collections of objects of a similar type (like the uids directory containing the user_info directories). So, use kobjects for the user_info directories, and a kset for the "uids" directory. On object cleanup, the final kobject_put() was missing. Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
386f275f5d
commit
eb41d9465c
@@ -552,18 +552,13 @@ struct user_struct {
|
||||
#ifdef CONFIG_FAIR_USER_SCHED
|
||||
struct task_group *tg;
|
||||
#ifdef CONFIG_SYSFS
|
||||
struct kset kset;
|
||||
struct subsys_attribute user_attr;
|
||||
struct kobject kobj;
|
||||
struct work_struct work;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FAIR_USER_SCHED
|
||||
extern int uids_kobject_init(void);
|
||||
#else
|
||||
static inline int uids_kobject_init(void) { return 0; }
|
||||
#endif
|
||||
extern int uids_sysfs_init(void);
|
||||
|
||||
extern struct user_struct *find_user(uid_t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user