diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-15 11:41:56 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-15 21:26:43 +0200 |
commit | 762cc40801ad757a34527d5e548816cf3b6fc606 (patch) | |
tree | 84bb263c67167db95120e44591f9ab8d11293f3f /include | |
parent | [INET]: Small cleanup for xxx_put after evictor consolidation (diff) | |
download | linux-762cc40801ad757a34527d5e548816cf3b6fc606.tar.xz linux-762cc40801ad757a34527d5e548816cf3b6fc606.zip |
[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 cf583cf7e9ef..911c2cd02941 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 |