Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1434618 > unrolled thread
| Started by | David Howells <dhowells@redhat.com> |
|---|---|
| First post | 2016-06-30 16:30 +0200 |
| Last post | 2016-06-30 16:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH net-next 03/19] rxrpc: Provide more refcount helper functions David Howells <dhowells@redhat.com> - 2016-06-30 16:30 +0200
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-06-30 16:30 +0200 |
| Subject | [PATCH net-next 03/19] rxrpc: Provide more refcount helper functions |
| Message-ID | <rPL8B-2eN-23@gated-at.bofh.it> |
Provide refcount helper functions for connections so that the code doesn't
touch conn->usage directly.
Also provide queueing helper functions so that the queueing of local and
connection objects can be fixed later.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/ar-internal.h | 12 +++++++++++-
net/rxrpc/conn_event.c | 2 +-
net/rxrpc/input.c | 2 +-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 796368d1fb25..45aef3ef7609 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -35,7 +35,6 @@ struct rxrpc_crypt {
queue_delayed_work(rxrpc_workqueue, (WS), (D))
#define rxrpc_queue_call(CALL) rxrpc_queue_work(&(CALL)->processor)
-#define rxrpc_queue_conn(CONN) rxrpc_queue_work(&(CONN)->processor)
struct rxrpc_connection;
@@ -566,6 +565,12 @@ static inline void rxrpc_get_connection(struct rxrpc_connection *conn)
atomic_inc(&conn->usage);
}
+
+static inline void rxrpc_queue_conn(struct rxrpc_connection *conn)
+{
+ rxrpc_queue_work(&conn->processor);
+}
+
/*
* input.c
*/
@@ -618,6 +623,11 @@ static inline void rxrpc_put_local(struct rxrpc_local *local)
__rxrpc_put_local(local);
}
+static inline void rxrpc_queue_local(struct rxrpc_local *local)
+{
+ rxrpc_queue_work(&local->processor);
+}
+
/*
* misc.c
*/
diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c
index 6a3c96707831..d7e183c6b5df 100644
--- a/net/rxrpc/conn_event.c
+++ b/net/rxrpc/conn_event.c
@@ -318,7 +318,7 @@ void rxrpc_reject_packet(struct rxrpc_local *local, struct sk_buff *skb)
CHECK_SLAB_OKAY(&local->usage);
skb_queue_tail(&local->reject_queue, skb);
- rxrpc_queue_work(&local->processor);
+ rxrpc_queue_local(local);
}
/*
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index f4bd57b77b93..8a68cc387a8c 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -595,7 +595,7 @@ static void rxrpc_post_packet_to_local(struct rxrpc_local *local,
_enter("%p,%p", local, skb);
skb_queue_tail(&local->event_queue, skb);
- rxrpc_queue_work(&local->processor);
+ rxrpc_queue_local(local);
}
/*
Back to top | Article view | linux.kernel
csiph-web