提交 74ba508f 编写于 作者: E Eric W. Biederman

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: NSerge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
上级 39fda8db
......@@ -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) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册