summaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2021-12-21 16:40:30 -0500
committerDavid S. Miller <davem@davemloft.net>2021-12-23 11:15:30 +0000
commit3d3b2f57d4447e6e9f4096ad01d0e4129f7bc7e9 (patch)
tree61f4a068e6fa93493bcaeca252a01cbb9aed7698 /net/sctp/socket.c
parente087cba11677217bf100888bc679d3013abffa5e (diff)
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 b5eff7128366 ("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>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 055a6d3ec6e2..eed3b87f51f4 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -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;
}