]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/inet_timewait_sock.h
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6-omap-h63xx.git] / include / net / inet_timewait_sock.h
index f7be1ac736016e404f30e462b80aa6f42c35e922..296547bfb0b726610141c511504d358e518e4d94 100644 (file)
@@ -66,7 +66,7 @@ struct inet_hashinfo;
 struct inet_timewait_death_row {
        /* Short-time timewait calendar */
        int                     twcal_hand;
-       int                     twcal_jiffie;
+       unsigned long           twcal_jiffie;
        struct timer_list       twcal_timer;
        struct hlist_head       twcal_row[INET_TWDR_RECYCLE_SLOTS];
 
@@ -115,6 +115,8 @@ struct inet_timewait_sock {
 #define tw_refcnt              __tw_common.skc_refcnt
 #define tw_hash                        __tw_common.skc_hash
 #define tw_prot                        __tw_common.skc_prot
+#define tw_net                 __tw_common.skc_net
+       int                     tw_timeout;
        volatile unsigned char  tw_substate;
        /* 3 bits hole, try to pack */
        unsigned char           tw_rcv_wscale;
@@ -129,7 +131,6 @@ struct inet_timewait_sock {
        __u8                    tw_ipv6only:1;
        /* 15 bits hole, try to pack */
        __u16                   tw_ipv6_offset;
-       int                     tw_timeout;
        unsigned long           tw_ttd;
        struct inet_bind_bucket *tw_tb;
        struct hlist_node       tw_death_node;
@@ -192,26 +193,11 @@ static inline __be32 inet_rcv_saddr(const struct sock *sk)
                inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr;
 }
 
-static inline void inet_twsk_put(struct inet_timewait_sock *tw)
-{
-       if (atomic_dec_and_test(&tw->tw_refcnt)) {
-               struct module *owner = tw->tw_prot->owner;
-               twsk_destructor((struct sock *)tw);
-#ifdef SOCK_REFCNT_DEBUG
-               printk(KERN_DEBUG "%s timewait_sock %p released\n",
-                      tw->tw_prot->name, tw);
-#endif
-               kmem_cache_free(tw->tw_prot->twsk_prot->twsk_slab, tw);
-               module_put(owner);
-       }
-}
+extern void inet_twsk_put(struct inet_timewait_sock *tw);
 
 extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
                                                  const int state);
 
-extern void __inet_twsk_kill(struct inet_timewait_sock *tw,
-                            struct inet_hashinfo *hashinfo);
-
 extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw,
                                  struct sock *sk,
                                  struct inet_hashinfo *hashinfo);