diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-15 02:41:56 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-15 12:26:43 -0700 |
commit | 762cc40801ad757a34527d5e548816cf3b6fc606 (patch) | |
tree | 84bb263c67167db95120e44591f9ab8d11293f3f /include | |
parent | 4b6cb5d8e3f5707d7a2e55cf7b05f1ea8bfc7a6d (diff) |
[INET]: Consolidate the xxx_put
These ones use the generic data types too, so move
them in one place.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_frag.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index cf583cf7e9e..911c2cd0294 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -51,4 +51,10 @@ void inet_frag_destroy(struct inet_frag_queue *q, struct inet_frags *f, int *work); int inet_frag_evictor(struct inet_frags *f); +static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) +{ + if (atomic_dec_and_test(&q->refcnt)) + inet_frag_destroy(q, f, NULL); +} + #endif |