diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-11-17 08:15:31 +0100 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-08 01:55:51 +0200 |
commit | c4a4d603796c727b9555867571f89483be9c565e (patch) | |
tree | ae3b47a7b8b35c866df53cb4b4a051d49a28904a /ipc/namespace.c | |
parent | cred: Add forward declaration of init_user_ns in all cases. (diff) | |
download | linux-c4a4d603796c727b9555867571f89483be9c565e.tar.xz linux-c4a4d603796c727b9555867571f89483be9c565e.zip |
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 'ipc/namespace.c')
-rw-r--r-- | ipc/namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c index ce0a647869b1..f362298c5ce4 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -46,7 +46,7 @@ static struct ipc_namespace *create_ipc_ns(struct task_struct *tsk, ipcns_notify(IPCNS_CREATED); register_ipcns_notifier(ns); - ns->user_ns = get_user_ns(task_cred_xxx(tsk, user)->user_ns); + ns->user_ns = get_user_ns(task_cred_xxx(tsk, user_ns)); return ns; } |