diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-17 22:45:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-10-17 22:45:23 -0400 |
commit | e521db9d790aaa60ae8920e21cb7faedc280fc36 (patch) | |
tree | c58a138e9729eb61edaf697b9e259001fb92feb2 /include/net/inet_frag.h | |
parent | 2588fe1d782f1686847493ad643157d5d10bf602 (diff) |
[INET]: Consolidate xxx_frag_alloc()
Just perform the kzalloc() allocation and setup common
fields in the inet_frag_queue(). Then return the result
to the caller to initialize the rest.
The inet_frag_alloc() may return NULL, so check the
return value before doing the container_of(). This looks
ugly, but the xxx_frag_alloc() will be removed soon.
The xxx_expire() timer callbacks are patches,
because the argument is now the inet_frag_queue, not
the protocol specific queue.
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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 133e187fbc98..412b8582a616 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h | |||
@@ -43,6 +43,7 @@ struct inet_frags { | |||
43 | void (*skb_free)(struct sk_buff *); | 43 | void (*skb_free)(struct sk_buff *); |
44 | int (*equal)(struct inet_frag_queue *q1, | 44 | int (*equal)(struct inet_frag_queue *q1, |
45 | struct inet_frag_queue *q2); | 45 | struct inet_frag_queue *q2); |
46 | void (*frag_expire)(unsigned long data); | ||
46 | }; | 47 | }; |
47 | 48 | ||
48 | void inet_frags_init(struct inet_frags *); | 49 | void inet_frags_init(struct inet_frags *); |
@@ -54,6 +55,7 @@ void inet_frag_destroy(struct inet_frag_queue *q, | |||
54 | int inet_frag_evictor(struct inet_frags *f); | 55 | int inet_frag_evictor(struct inet_frags *f); |
55 | struct inet_frag_queue *inet_frag_intern(struct inet_frag_queue *q, | 56 | struct inet_frag_queue *inet_frag_intern(struct inet_frag_queue *q, |
56 | struct inet_frags *f, unsigned int hash); | 57 | struct inet_frags *f, unsigned int hash); |
58 | struct inet_frag_queue *inet_frag_alloc(struct inet_frags *f); | ||
57 | 59 | ||
58 | static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) | 60 | static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) |
59 | { | 61 | { |