提交 c9bf52a1 编写于 作者: O Or Cohen 提交者: Jakub Kicinski

net/af_unix: Remove unused old_pid variable

Commit 109f6e39 ("af_unix: Allow SO_PEERCRED
to work across namespaces.") introduced the old_pid variable
in unix_listen, but it's never used.
Remove the declaration and the call to put_pid.
Signed-off-by: NOr Cohen <orcohen@paloaltonetworks.com>
Link: https://lore.kernel.org/r/20201011153527.18628-1-orcohen@paloaltonetworks.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 0403a2b5
...@@ -613,7 +613,6 @@ static int unix_listen(struct socket *sock, int backlog) ...@@ -613,7 +613,6 @@ static int unix_listen(struct socket *sock, int backlog)
int err; int err;
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk); struct unix_sock *u = unix_sk(sk);
struct pid *old_pid = NULL;
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET) if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
...@@ -634,7 +633,6 @@ static int unix_listen(struct socket *sock, int backlog) ...@@ -634,7 +633,6 @@ static int unix_listen(struct socket *sock, int backlog)
out_unlock: out_unlock:
unix_state_unlock(sk); unix_state_unlock(sk);
put_pid(old_pid);
out: out:
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册