rxrpc: Allow listen(sock, 0) to be used to disable listening
authorDavid Howells <dhowells@redhat.com>
Thu, 5 Jan 2017 10:38:36 +0000 (10:38 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 9 Jan 2017 11:10:02 +0000 (11:10 +0000)
commit210f035316f545e6f507e7d61e191495ba983e27
tree2e8a73099c2adf217251136bad50a8ec4bac840b
parent56ff9c837778ba2cf76f29c966856a9341e5939d
rxrpc: Allow listen(sock, 0) to be used to disable listening

Allow listen() with a backlog of 0 to be used to disable listening on an
AF_RXRPC socket.  This also releases any preallocation, thereby making it
easier for a kernel service to account for all allocated call structures
when shutting down the service.

The socket cannot thereafter have listening reenabled, but must rather be
closed and reopened.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/af_rxrpc.c
net/rxrpc/ar-internal.h
net/rxrpc/call_accept.c