Lines Matching defs:tb
38 struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC);
40 if (tb != NULL) {
41 write_pnet(&tb->ib_net, hold_net(net));
42 tb->port = snum;
43 tb->fastreuse = 0;
44 tb->num_owners = 0;
45 INIT_HLIST_HEAD(&tb->owners);
46 hlist_add_head(&tb->node, &head->chain);
48 return tb;
52 * Caller must hold hashbucket lock for this tb with local BH disabled
54 void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb)
56 if (hlist_empty(&tb->owners)) {
57 __hlist_del(&tb->node);
58 release_net(ib_net(tb));
59 kmem_cache_free(cachep, tb);
63 void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb,
71 sk_add_bind_node(sk, &tb->owners);
72 tb->num_owners++;
73 inet_csk(sk)->icsk_bind_hash = tb;
85 struct inet_bind_bucket *tb;
90 tb = inet_csk(sk)->icsk_bind_hash;
92 tb->num_owners--;
95 inet_bind_bucket_destroy(hashinfo->bind_bucket_cachep, tb);
113 struct inet_bind_bucket *tb;
116 tb = inet_csk(sk)->icsk_bind_hash;
117 sk_add_bind_node(child, &tb->owners);
118 inet_csk(child)->icsk_bind_hash = tb;
442 struct inet_bind_bucket *tb;
470 inet_bind_bucket_for_each(tb, node, &head->chain) {
471 if (net_eq(ib_net(tb), net) &&
472 tb->port == port) {
473 if (tb->fastreuse >= 0)
475 WARN_ON(hlist_empty(&tb->owners));
483 tb = inet_bind_bucket_create(hinfo->bind_bucket_cachep,
485 if (!tb) {
489 tb->fastreuse = -1;
503 inet_bind_hash(sk, tb, port);
525 tb = inet_csk(sk)->icsk_bind_hash;
527 if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) {