]> err.no Git - linux-2.6/blobdiff - net/ipv6/inet6_hashtables.c
video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver
[linux-2.6] / net / ipv6 / inet6_hashtables.c
index b940156ca4f5727411d0c19ba433a6045b886054..00a8a5f9380c3d454419c75074a5eccf3c2bc4f7 100644 (file)
@@ -68,7 +68,7 @@ struct sock *__inet6_lookup_established(struct net *net,
        /* Optimize here for direct hit, only listening connections can
         * have wildcards anyways.
         */
-       unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport);
+       unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport);
        struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash);
        rwlock_t *lock = inet_ehash_lockp(hashinfo, hash);
 
@@ -166,14 +166,14 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row,
        const struct in6_addr *saddr = &np->daddr;
        const int dif = sk->sk_bound_dev_if;
        const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport);
-       const unsigned int hash = inet6_ehashfn(daddr, lport, saddr,
+       struct net *net = sock_net(sk);
+       const unsigned int hash = inet6_ehashfn(net, daddr, lport, saddr,
                                                inet->dport);
        struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash);
        rwlock_t *lock = inet_ehash_lockp(hinfo, hash);
        struct sock *sk2;
        const struct hlist_node *node;
        struct inet_timewait_sock *tw;
-       struct net *net = sock_net(sk);
 
        prefetch(head->chain.first);
        write_lock(lock);
@@ -210,11 +210,11 @@ unique:
 
        if (twp != NULL) {
                *twp = tw;
-               NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED);
+               NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED);
        } else if (tw != NULL) {
                /* Silly. Should hash-dance instead... */
                inet_twsk_deschedule(tw, death_row);
-               NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED);
+               NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED);
 
                inet_twsk_put(tw);
        }