Commit a095326e authored by Chuck Lever's avatar Chuck Lever Committed by Jakub Kicinski
Browse files

net/handshake: Remove unneeded check from handshake_dup()



handshake_req_submit() now verifies that the socket has a file.

Fixes: 3b3009ea ("net/handshake: Create a NETLINK service for handling handshake requests")
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0c615f1c
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -99,9 +99,6 @@ static int handshake_dup(struct socket *sock)
	struct file *file;
	int newfd;

	if (!sock->file)
		return -EBADF;

	file = get_file(sock->file);
	newfd = get_unused_fd_flags(O_CLOEXEC);
	if (newfd < 0) {