diff options
author | David Howells <dhowells@redhat.com> | 2016-08-24 07:30:52 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-08-24 15:17:14 +0100 |
commit | 4d028b2c82991e2f9ae89ad90aeaaeb713495043 (patch) | |
tree | 6c94c0a36600d69bb4ed9928372d08f952529f93 /net/rxrpc/conn_object.c | |
parent | df5d8bf70f64a2ee34234553eb215418dbc4c8f3 (diff) |
rxrpc: Dup the main conn list for the proc interface
The main connection list is used for two independent purposes: primarily it
is used to find connections to reap and secondarily it is used to list
connections in procfs.
Split the procfs list out from the reap list. This allows us to stop using
the reap list for client connections when they acquire a separate
management strategy from service collections.
The client connections will not be on a management single list, and sometimes
won't be on a management list at all. This doesn't leave them floating,
however, as they will also be on an rb-tree rooted on the socket so that the
socket can find them to dispatch calls.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_object.c')
-rw-r--r-- | net/rxrpc/conn_object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c index b4af37ebb112..afc2d83d5995 100644 --- a/net/rxrpc/conn_object.c +++ b/net/rxrpc/conn_object.c @@ -27,6 +27,7 @@ unsigned int rxrpc_connection_expiry = 10 * 60; static void rxrpc_connection_reaper(struct work_struct *work); LIST_HEAD(rxrpc_connections); +LIST_HEAD(rxrpc_connection_proc_list); DEFINE_RWLOCK(rxrpc_connection_lock); static DECLARE_DELAYED_WORK(rxrpc_connection_reap, rxrpc_connection_reaper); @@ -44,6 +45,7 @@ struct rxrpc_connection *rxrpc_alloc_connection(gfp_t gfp) spin_lock_init(&conn->channel_lock); init_waitqueue_head(&conn->channel_wq); INIT_WORK(&conn->processor, &rxrpc_process_connection); + INIT_LIST_HEAD(&conn->proc_link); INIT_LIST_HEAD(&conn->link); skb_queue_head_init(&conn->rx_queue); conn->security = &rxrpc_no_security; @@ -283,6 +285,7 @@ static void rxrpc_connection_reaper(struct work_struct *work) rxrpc_unpublish_service_conn(conn); list_move_tail(&conn->link, &graveyard); + list_del_init(&conn->proc_link); } write_unlock(&rxrpc_connection_lock); |