summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorOr Cohen <orcohen2006@gmail.com>2020-10-11 18:35:27 +0300
committerJakub Kicinski <kuba@kernel.org>2020-10-13 17:21:46 -0700
commitc9bf52a173c73be41742c768728e239ffbb63a71 (patch)
tree4fe10d6c9e5dbda89701701ad40bd5f51cacf584 /net/unix/af_unix.c
parent0403a2b53c29b49c66f89dcbc07ebab37b7af29c (diff)
net/af_unix: Remove unused old_pid variable
Commit 109f6e39fa07c48f5801 ("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: Or Cohen <orcohen@paloaltonetworks.com> Link: https://lore.kernel.org/r/20201011153527.18628-1-orcohen@paloaltonetworks.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index eb82bdc6cf7c..41c3303c3357 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -613,7 +613,6 @@ static int unix_listen(struct socket *sock, int backlog)
int err;
struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk);
- struct pid *old_pid = NULL;
err = -EOPNOTSUPP;
if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
@@ -634,7 +633,6 @@ static int unix_listen(struct socket *sock, int backlog)
out_unlock:
unix_state_unlock(sk);
- put_pid(old_pid);
out:
return err;
}