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 /fs/ecryptfs | |
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 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/messaging.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index ab2248090515..a750f957b145 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c | |||
@@ -303,7 +303,7 @@ int ecryptfs_process_response(struct ecryptfs_message *msg, uid_t euid, | |||
303 | mutex_unlock(&ecryptfs_daemon_hash_mux); | 303 | mutex_unlock(&ecryptfs_daemon_hash_mux); |
304 | goto wake_up; | 304 | goto wake_up; |
305 | } | 305 | } |
306 | tsk_user_ns = __task_cred(msg_ctx->task)->user->user_ns; | 306 | tsk_user_ns = __task_cred(msg_ctx->task)->user_ns; |
307 | ctx_euid = task_euid(msg_ctx->task); | 307 | ctx_euid = task_euid(msg_ctx->task); |
308 | rc = ecryptfs_find_daemon_by_euid(&daemon, ctx_euid, tsk_user_ns); | 308 | rc = ecryptfs_find_daemon_by_euid(&daemon, ctx_euid, tsk_user_ns); |
309 | rcu_read_unlock(); | 309 | rcu_read_unlock(); |