diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 09:11:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 09:11:18 -0700 |
commit | e6d5a11dad44b8ae18ca8fc4ecb72ccccfa0a2d2 (patch) | |
tree | 7e3837c8f28e2e969a7b7d040b00676c90bf72c7 /kernel/user.c | |
parent | b6257a9036f06878a0f02354d5a07f155e1cfee0 (diff) | |
parent | b9dca1e0fcb696716840a3bc8f20a6941b484dbf (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
sched: fix new task startup crash
sched: fix !SYSFS build breakage
sched: fix improper load balance across sched domain
sched: more robust sd-sysctl entry freeing
Diffstat (limited to 'kernel/user.c')
-rw-r--r-- | kernel/user.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/kernel/user.c b/kernel/user.c index 9cb6f640356..e91331c457e 100644 --- a/kernel/user.c +++ b/kernel/user.c @@ -84,9 +84,6 @@ static struct user_struct *uid_hash_find(uid_t uid, struct hlist_head *hashent) #ifdef CONFIG_FAIR_USER_SCHED -static struct kobject uids_kobject; /* represents /sys/kernel/uids directory */ -static DEFINE_MUTEX(uids_mutex); - static void sched_destroy_user(struct user_struct *up) { sched_destroy_group(up->tg); @@ -108,6 +105,19 @@ static void sched_switch_user(struct task_struct *p) sched_move_task(p); } +#else /* CONFIG_FAIR_USER_SCHED */ + +static void sched_destroy_user(struct user_struct *up) { } +static int sched_create_user(struct user_struct *up) { return 0; } +static void sched_switch_user(struct task_struct *p) { } + +#endif /* CONFIG_FAIR_USER_SCHED */ + +#if defined(CONFIG_FAIR_USER_SCHED) && defined(CONFIG_SYSFS) + +static struct kobject uids_kobject; /* represents /sys/kernel/uids directory */ +static DEFINE_MUTEX(uids_mutex); + static inline void uids_mutex_lock(void) { mutex_lock(&uids_mutex); @@ -254,11 +264,8 @@ static inline void free_user(struct user_struct *up, unsigned long flags) schedule_work(&up->work); } -#else /* CONFIG_FAIR_USER_SCHED */ +#else /* CONFIG_FAIR_USER_SCHED && CONFIG_SYSFS */ -static void sched_destroy_user(struct user_struct *up) { } -static int sched_create_user(struct user_struct *up) { return 0; } -static void sched_switch_user(struct task_struct *p) { } static inline int user_kobject_create(struct user_struct *up) { return 0; } static inline void uids_mutex_lock(void) { } static inline void uids_mutex_unlock(void) { } @@ -277,7 +284,7 @@ static inline void free_user(struct user_struct *up, unsigned long flags) kmem_cache_free(uid_cachep, up); } -#endif /* CONFIG_FAIR_USER_SCHED */ +#endif /* * Locate the user_struct for the passed UID. If found, take a ref on it. The |