diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-15 09:41:56 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-15 19:26:43 (GMT) |
commit | 762cc40801ad757a34527d5e548816cf3b6fc606 (patch) | |
tree | 84bb263c67167db95120e44591f9ab8d11293f3f /include/net | |
parent | 4b6cb5d8e3f5707d7a2e55cf7b05f1ea8bfc7a6d (diff) | |
download | linux-762cc40801ad757a34527d5e548816cf3b6fc606.tar.xz |
[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/net')
-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 cf583cf..911c2cd 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 |