diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-11-17 02:15:31 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-07 19:55:51 -0400 |
commit | c4a4d603796c727b9555867571f89483be9c565e (patch) | |
tree | ae3b47a7b8b35c866df53cb4b4a051d49a28904a /kernel/sched/core.c | |
parent | 7e6bd8fadd1216f50468f965d0308f45e5109ced (diff) |
userns: Use cred->user_ns instead of cred->user->user_ns
Optimize performance and prepare for the removal of the user_ns reference
from user_struct. Remove the slow long walk through cred->user->user_ns and
instead go straight to cred->user_ns.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4603b9d8f30a..96bff855b866 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -4042,7 +4042,7 @@ static bool check_same_owner(struct task_struct *p) | |||
4042 | 4042 | ||
4043 | rcu_read_lock(); | 4043 | rcu_read_lock(); |
4044 | pcred = __task_cred(p); | 4044 | pcred = __task_cred(p); |
4045 | if (cred->user->user_ns == pcred->user->user_ns) | 4045 | if (cred->user_ns == pcred->user_ns) |
4046 | match = (cred->euid == pcred->euid || | 4046 | match = (cred->euid == pcred->euid || |
4047 | cred->euid == pcred->uid); | 4047 | cred->euid == pcred->uid); |
4048 | else | 4048 | else |