1. 18 10月, 2007 2 次提交
    • P
      [INET]: Consolidate xxx_frag_alloc() · e521db9d
      Pavel Emelyanov 提交于
      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: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e521db9d
    • P
      [INET]: Consolidate xxx_frag_intern · 2588fe1d
      Pavel Emelyanov 提交于
      This routine checks for the existence of a given entry
      in the hash table and inserts the new one if needed.
      
      The ->equal callback is used to compare two frag_queue-s
      together, but this one is temporary and will be removed
      later. The netfilter code and the ipv6 one use the same
      routine to compare frags.
      
      The inet_frag_intern() always returns non-NULL pointer,
      so convert the inet_frag_queue into protocol specific
      one (with the container_of) without any checks.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2588fe1d
  2. 16 10月, 2007 8 次提交