conn_object.c (5040011d073d3acdeb58af2b64f84e33bb03abd2) conn_object.c (f2cce89a074e6d2991dddc94f6b6ebe1576b8459)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/* RxRPC virtual connection handler, common bits.
3 *
4 * Copyright (C) 2007, 2016 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 */
7
8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

--- 9 unchanged lines hidden (view full) ---

18 */
19unsigned int __read_mostly rxrpc_connection_expiry = 10 * 60;
20unsigned int __read_mostly rxrpc_closed_conn_expiry = 10;
21
22static void rxrpc_clean_up_connection(struct work_struct *work);
23static void rxrpc_set_service_reap_timer(struct rxrpc_net *rxnet,
24 unsigned long reap_at);
25
1// SPDX-License-Identifier: GPL-2.0-or-later
2/* RxRPC virtual connection handler, common bits.
3 *
4 * Copyright (C) 2007, 2016 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 */
7
8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

--- 9 unchanged lines hidden (view full) ---

18 */
19unsigned int __read_mostly rxrpc_connection_expiry = 10 * 60;
20unsigned int __read_mostly rxrpc_closed_conn_expiry = 10;
21
22static void rxrpc_clean_up_connection(struct work_struct *work);
23static void rxrpc_set_service_reap_timer(struct rxrpc_net *rxnet,
24 unsigned long reap_at);
25
26void rxrpc_poke_conn(struct rxrpc_connection *conn, enum rxrpc_conn_trace why)
27{
28 struct rxrpc_local *local = conn->local;
29 bool busy;
30
31 if (WARN_ON_ONCE(!local))
32 return;
33
34 spin_lock_bh(&local->lock);
35 busy = !list_empty(&conn->attend_link);
36 if (!busy) {
37 rxrpc_get_connection(conn, why);
38 list_add_tail(&conn->attend_link, &local->conn_attend_q);
39 }
40 spin_unlock_bh(&local->lock);
41 rxrpc_wake_up_io_thread(local);
42}
43
26static void rxrpc_connection_timer(struct timer_list *timer)
27{
28 struct rxrpc_connection *conn =
29 container_of(timer, struct rxrpc_connection, timer);
30
44static void rxrpc_connection_timer(struct timer_list *timer)
45{
46 struct rxrpc_connection *conn =
47 container_of(timer, struct rxrpc_connection, timer);
48
31 rxrpc_queue_conn(conn, rxrpc_conn_queue_timer);
49 rxrpc_poke_conn(conn, rxrpc_conn_get_poke_timer);
32}
33
34/*
35 * allocate a new connection
36 */
37struct rxrpc_connection *rxrpc_alloc_connection(struct rxrpc_net *rxnet,
38 gfp_t gfp)
39{

--- 438 unchanged lines hidden ---
50}
51
52/*
53 * allocate a new connection
54 */
55struct rxrpc_connection *rxrpc_alloc_connection(struct rxrpc_net *rxnet,
56 gfp_t gfp)
57{

--- 438 unchanged lines hidden ---