[Devel] Re: [patch 3/3][NETNS45][V2] remove timewait sockets at cleanup
Denis V. Lunev
den at sw.ru
Thu Sep 27 23:47:08 PDT 2007
Daniel Lezcano wrote:
> local_bh_disable();
>
> /* Browse the the established hash table */
> for (h = 0; h < (tcp_hashinfo.ehash_size); h++) {
> struct inet_ehash_bucket *head =
> inet_ehash_bucket(&tcp_hashinfo, h);
> restart:
> write_lock(&head->lock);
> sk_for_each_safe(sk, node, tmp, &head->twchain) {
> tw = inet_twsk(sk);
> if (tw->tw_net != net)
> continue;
> sock_hold(sk);
> write_unlock(&head->lock);
> inet_twsk_deschedule(tw, &tcp_death_row);
> inet_twsk_put(tw);
> goto restart;
> }
> }
>
> local_bh_enable();
yes :)
More information about the Devel
mailing list