diff options
author | Xin Long <lucien.xin@gmail.com> | 2015-12-30 23:50:49 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-05 12:24:01 -0500 |
commit | b5eff7128366c4a7a9b502097a968ec9cae2bea2 (patch) | |
tree | 7d82c07abe7e77d96983d3428697f2815e671204 /net/sctp/input.c | |
parent | 39f66a7dce3213fb0a0c6256929c816df27c7548 (diff) | |
download | linux-b5eff7128366c4a7a9b502097a968ec9cae2bea2.tar.bz2 |
sctp: drop the old assoc hashtable of sctp
transport hashtable will replace the association hashtable,
so association hashtable is not used in sctp any more, so
drop the codes about that.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r-- | net/sctp/input.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 6f075d835764..d9a6e66c5c8a 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -913,67 +913,6 @@ struct sctp_transport *sctp_epaddr_lookup_transport( return sctp_addrs_lookup_transport(net, &addr->a, paddr); } -/* Insert association into the hash table. */ -static void __sctp_hash_established(struct sctp_association *asoc) -{ - struct net *net = sock_net(asoc->base.sk); - struct sctp_ep_common *epb; - struct sctp_hashbucket *head; - - epb = &asoc->base; - - /* Calculate which chain this entry will belong to. */ - epb->hashent = sctp_assoc_hashfn(net, epb->bind_addr.port, - asoc->peer.port); - - head = &sctp_assoc_hashtable[epb->hashent]; - - write_lock(&head->lock); - hlist_add_head(&epb->node, &head->chain); - write_unlock(&head->lock); -} - -/* Add an association to the hash. Local BH-safe. */ -void sctp_hash_established(struct sctp_association *asoc) -{ - if (asoc->temp) - return; - - local_bh_disable(); - __sctp_hash_established(asoc); - local_bh_enable(); -} - -/* Remove association from the hash table. */ -static void __sctp_unhash_established(struct sctp_association *asoc) -{ - struct net *net = sock_net(asoc->base.sk); - struct sctp_hashbucket *head; - struct sctp_ep_common *epb; - - epb = &asoc->base; - - epb->hashent = sctp_assoc_hashfn(net, epb->bind_addr.port, - asoc->peer.port); - - head = &sctp_assoc_hashtable[epb->hashent]; - - write_lock(&head->lock); - hlist_del_init(&epb->node); - write_unlock(&head->lock); -} - -/* Remove association from the hash table. Local BH-safe. */ -void sctp_unhash_established(struct sctp_association *asoc) -{ - if (asoc->temp) - return; - - local_bh_disable(); - __sctp_unhash_established(asoc); - local_bh_enable(); -} - /* Look up an association. */ static struct sctp_association *__sctp_lookup_association( struct net *net, |