From: Eric W. Biederman Date: Sun, 4 Mar 2012 02:58:11 +0000 (-0800) Subject: userns: Remove unnecessary cast to struct user_struct when copying cred->user. X-Git-Tag: v3.5-rc1~107^2~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=74ba508f60c3650595297b33a4cdfd02e443194e;p=karo-tx-linux.git userns: Remove unnecessary cast to struct user_struct when copying cred->user. In struct cred the user member is and has always been declared struct user_struct *user. At most a constant struct cred will have a constant pointer to non-constant user_struct so remove this unnecessary cast. Acked-by: Serge Hallyn Signed-off-by: Eric W. Biederman --- diff --git a/kernel/sys.c b/kernel/sys.c index e7006eb6c1e4..f7a43514ac65 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -209,7 +209,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) } while_each_pid_thread(pgrp, PIDTYPE_PGID, p); break; case PRIO_USER: - user = (struct user_struct *) cred->user; + user = cred->user; if (!who) who = cred->uid; else if ((who != cred->uid) && @@ -274,7 +274,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who) } while_each_pid_thread(pgrp, PIDTYPE_PGID, p); break; case PRIO_USER: - user = (struct user_struct *) cred->user; + user = cred->user; if (!who) who = cred->uid; else if ((who != cred->uid) &&