diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-15 05:41:56 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-15 15:26:43 -0400 |
commit | 762cc40801ad757a34527d5e548816cf3b6fc606 (patch) | |
tree | 84bb263c67167db95120e44591f9ab8d11293f3f /include/net/inet_frag.h | |
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/net/inet_frag.h')
-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, | |||
51 | struct inet_frags *f, int *work); | 51 | struct inet_frags *f, int *work); |
52 | int inet_frag_evictor(struct inet_frags *f); | 52 | int inet_frag_evictor(struct inet_frags *f); |
53 | 53 | ||
54 | static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) | ||
55 | { | ||
56 | if (atomic_dec_and_test(&q->refcnt)) | ||
57 | inet_frag_destroy(q, f, NULL); | ||
58 | } | ||
59 | |||
54 | #endif | 60 | #endif |