[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>
Showing
- include/net/inet_frag.h 2 additions, 0 deletionsinclude/net/inet_frag.h
- net/ipv4/inet_fragment.c 17 additions, 0 deletionsnet/ipv4/inet_fragment.c
- net/ipv4/ip_fragment.c 7 additions, 13 deletionsnet/ipv4/ip_fragment.c
- net/ipv6/netfilter/nf_conntrack_reasm.c 8 additions, 11 deletionsnet/ipv6/netfilter/nf_conntrack_reasm.c
- net/ipv6/reassembly.c 7 additions, 12 deletionsnet/ipv6/reassembly.c
Loading
Please register or sign in to comment