diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2016-07-28 16:36:31 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-08-02 01:57:28 +0200 |
commit | 6773b7dc39f165bd9d824b50ac52cbb3f87d53c8 (patch) | |
tree | eec9a1d84ed6d1c3113cd35c47887d6dd42d4448 /include/net | |
parent | VSOCK: transport-specific vsock_transport functions (diff) | |
download | linux-6773b7dc39f165bd9d824b50ac52cbb3f87d53c8.tar.xz linux-6773b7dc39f165bd9d824b50ac52cbb3f87d53c8.zip |
VSOCK: defer sock removal to transports
The virtio transport will implement graceful shutdown and the related
SO_LINGER socket option. This requires orphaning the sock but keeping
it in the table of connections after .release().
This patch adds the vsock_remove_sock() function and leaves it up to the
transport when to remove the sock.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/af_vsock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index 23f55259b60d..3af0b224f754 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -180,6 +180,7 @@ void vsock_remove_connected(struct vsock_sock *vsk); struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr); struct sock *vsock_find_connected_socket(struct sockaddr_vm *src, struct sockaddr_vm *dst); +void vsock_remove_sock(struct vsock_sock *vsk); void vsock_for_each_connected_socket(void (*fn)(struct sock *sk)); #endif /* __AF_VSOCK_H__ */ |