Skip to content

Commit a095326

Browse files
chuckleverkuba-moo
authored andcommitted
net/handshake: Remove unneeded check from handshake_dup()
handshake_req_submit() now verifies that the socket has a file. Fixes: 3b3009e ("net/handshake: Create a NETLINK service for handling handshake requests") Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0c615f1 commit a095326

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

net/handshake/netlink.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ static int handshake_dup(struct socket *sock)
9999
struct file *file;
100100
int newfd;
101101

102-
if (!sock->file)
103-
return -EBADF;
104-
105102
file = get_file(sock->file);
106103
newfd = get_unused_fd_flags(O_CLOEXEC);
107104
if (newfd < 0) {

0 commit comments

Comments
 (0)