aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2010-03-24 01:17:19 -0400
committerIngo Molnar <mingo@elte.hu>2010-04-02 14:12:00 -0400
commit32bd7eb5a7f4596c8440dd9440322fe9e686634d (patch)
treef1d0c0a215c1305aec0a8f407b431a975f7ad072 /kernel
parentc9494727cf293ae2ec66af57547a3e79c724fec2 (diff)
sched: Remove remaining USER_SCHED code
This is left over from commit 7c9414385e ("sched: Remove USER_SCHED"") Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Dhaval Giani <dhaval.giani@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: David Howells <dhowells@redhat.com> LKML-Reference: <4BA9A05F.7010407@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/capability.c1
-rw-r--r--kernel/cred-internals.h21
-rw-r--r--kernel/cred.c3
-rw-r--r--kernel/exit.c1
-rw-r--r--kernel/sched_debug.c5
-rw-r--r--kernel/user.c10
6 files changed, 1 insertions, 40 deletions
diff --git a/kernel/capability.c b/kernel/capability.c
index 9e4697e9b276..2f05303715a5 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -15,7 +15,6 @@
15#include <linux/syscalls.h> 15#include <linux/syscalls.h>
16#include <linux/pid_namespace.h> 16#include <linux/pid_namespace.h>
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include "cred-internals.h"
19 18
20/* 19/*
21 * Leveraged for setting/resetting capabilities 20 * Leveraged for setting/resetting capabilities
diff --git a/kernel/cred-internals.h b/kernel/cred-internals.h
deleted file mode 100644
index 2dc4fc2d0bf1..000000000000
--- a/kernel/cred-internals.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* Internal credentials stuff
2 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12/*
13 * user.c
14 */
15static inline void sched_switch_user(struct task_struct *p)
16{
17#ifdef CONFIG_USER_SCHED
18 sched_move_task(p);
19#endif /* CONFIG_USER_SCHED */
20}
21
diff --git a/kernel/cred.c b/kernel/cred.c
index 1b1129d0cce8..19d3ccce3d4d 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -16,7 +16,6 @@
16#include <linux/init_task.h> 16#include <linux/init_task.h>
17#include <linux/security.h> 17#include <linux/security.h>
18#include <linux/cn_proc.h> 18#include <linux/cn_proc.h>
19#include "cred-internals.h"
20 19
21#if 0 20#if 0
22#define kdebug(FMT, ...) \ 21#define kdebug(FMT, ...) \
@@ -557,8 +556,6 @@ int commit_creds(struct cred *new)
557 atomic_dec(&old->user->processes); 556 atomic_dec(&old->user->processes);
558 alter_cred_subscribers(old, -2); 557 alter_cred_subscribers(old, -2);
559 558
560 sched_switch_user(task);
561
562 /* send notifications */ 559 /* send notifications */
563 if (new->uid != old->uid || 560 if (new->uid != old->uid ||
564 new->euid != old->euid || 561 new->euid != old->euid ||
diff --git a/kernel/exit.c b/kernel/exit.c
index cce59cb5ee6a..84dc4b294e47 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -55,7 +55,6 @@
55#include <asm/unistd.h> 55#include <asm/unistd.h>
56#include <asm/pgtable.h> 56#include <asm/pgtable.h>
57#include <asm/mmu_context.h> 57#include <asm/mmu_context.h>
58#include "cred-internals.h"
59 58
60static void exit_mm(struct task_struct * tsk); 59static void exit_mm(struct task_struct * tsk);
61 60
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 8a46a719f367..0932c5c45b34 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -173,11 +173,6 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
173 task_group_path(tg, path, sizeof(path)); 173 task_group_path(tg, path, sizeof(path));
174 174
175 SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, path); 175 SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, path);
176#elif defined(CONFIG_USER_SCHED) && defined(CONFIG_FAIR_GROUP_SCHED)
177 {
178 uid_t uid = cfs_rq->tg->uid;
179 SEQ_printf(m, "\ncfs_rq[%d] for UID: %u\n", cpu, uid);
180 }
181#else 176#else
182 SEQ_printf(m, "\ncfs_rq[%d]:\n", cpu); 177 SEQ_printf(m, "\ncfs_rq[%d]:\n", cpu);
183#endif 178#endif
diff --git a/kernel/user.c b/kernel/user.c
index ec3b2229893b..8e1c8c0a496c 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -16,7 +16,6 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/user_namespace.h> 18#include <linux/user_namespace.h>
19#include "cred-internals.h"
20 19
21struct user_namespace init_user_ns = { 20struct user_namespace init_user_ns = {
22 .kref = { 21 .kref = {
@@ -137,9 +136,7 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)
137 struct hlist_head *hashent = uidhashentry(ns, uid); 136 struct hlist_head *hashent = uidhashentry(ns, uid);
138 struct user_struct *up, *new; 137 struct user_struct *up, *new;
139 138
140 /* Make uid_hash_find() + uids_user_create() + uid_hash_insert() 139 /* Make uid_hash_find() + uid_hash_insert() atomic. */
141 * atomic.
142 */
143 spin_lock_irq(&uidhash_lock); 140 spin_lock_irq(&uidhash_lock);
144 up = uid_hash_find(uid, hashent); 141 up = uid_hash_find(uid, hashent);
145 spin_unlock_irq(&uidhash_lock); 142 spin_unlock_irq(&uidhash_lock);
@@ -161,11 +158,6 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)
161 spin_lock_irq(&uidhash_lock); 158 spin_lock_irq(&uidhash_lock);
162 up = uid_hash_find(uid, hashent); 159 up = uid_hash_find(uid, hashent);
163 if (up) { 160 if (up) {
164 /* This case is not possible when CONFIG_USER_SCHED
165 * is defined, since we serialize alloc_uid() using
166 * uids_mutex. Hence no need to call
167 * sched_destroy_user() or remove_user_sysfs_dir().
168 */
169 key_put(new->uid_keyring); 161 key_put(new->uid_keyring);
170 key_put(new->session_keyring); 162 key_put(new->session_keyring);
171 kmem_cache_free(uid_cachep, new); 163 kmem_cache_free(uid_cachep, new);