sctp: move hlist_node and hashent out of sctp_ep_common
Struct sctp_ep_common is included in both asoc and ep, but hlist_node
and hashent are only needed by ep after asoc_hashtable was dropped by
Commit b5eff71283 ("sctp: drop the old assoc hashtable of sctp").
So it is better to move hlist_node and hashent from sctp_ep_common to
sctp_endpoint, and it saves some space for each asoc.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e087cba116
commit
3d3b2f57d4
@@ -5294,14 +5294,14 @@ int sctp_for_each_endpoint(int (*cb)(struct sctp_endpoint *, void *),
|
||||
void *p) {
|
||||
int err = 0;
|
||||
int hash = 0;
|
||||
struct sctp_ep_common *epb;
|
||||
struct sctp_endpoint *ep;
|
||||
struct sctp_hashbucket *head;
|
||||
|
||||
for (head = sctp_ep_hashtable; hash < sctp_ep_hashsize;
|
||||
hash++, head++) {
|
||||
read_lock_bh(&head->lock);
|
||||
sctp_for_each_hentry(epb, &head->chain) {
|
||||
err = cb(sctp_ep(epb), p);
|
||||
sctp_for_each_hentry(ep, &head->chain) {
|
||||
err = cb(ep, p);
|
||||
if (err)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user