]> git.ipfire.org Git - thirdparty/linux.git/commit
vsock: introduce vsock_pending_to_accept() helper
authorRaf Dickson <rafdog35@gmail.com>
Fri, 12 Jun 2026 04:52:13 +0000 (04:52 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Jun 2026 17:38:27 +0000 (10:38 -0700)
commit77eee189397df7ef8a19cf279db6845ab839662e
tree1310cf597b7cbbe4429310e604144c5d4bd13ac8
parent4ff2e84ff1b33d79fa0e3ae355ce4a334908ef9a
vsock: introduce vsock_pending_to_accept() helper

Add vsock_pending_to_accept() to move a socket directly from the
pending list to the accept queue in a single operation, avoiding
the sock_put/sock_hold dance and the sk_acceptq_removed()/
sk_acceptq_added() pair that would otherwise be needed when
calling vsock_remove_pending() followed by vsock_enqueue_accept().

Use it in vmci_transport_recv_connecting_server() where a completed
handshake transitions the socket from pending to accept queue.

Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Raf Dickson <rafdog35@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Link: https://patch.msgid.link/20260612045216.105796-2-rafdog35@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/af_vsock.h
net/vmw_vsock/af_vsock.c
net/vmw_vsock/vmci_transport.c