summaryrefslogtreecommitdiffstats
path: root/security/keys/key.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-11-17 08:15:31 +0100
committerEric W. Biederman <ebiederm@xmission.com>2012-04-08 01:55:51 +0200
commitc4a4d603796c727b9555867571f89483be9c565e (patch)
treeae3b47a7b8b35c866df53cb4b4a051d49a28904a /security/keys/key.c
parentcred: Add forward declaration of init_user_ns in all cases. (diff)
downloadlinux-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 'security/keys/key.c')
-rw-r--r--security/keys/key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 06783cffb3af..7e6034793af3 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -253,7 +253,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
quotalen = desclen + type->def_datalen;
/* get hold of the key tracking for this user */
- user = key_user_lookup(uid, cred->user->user_ns);
+ user = key_user_lookup(uid, cred->user_ns);
if (!user)
goto no_memory_1;