mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-01 23:53:16 -04:00
sctp: get netns from asoc and ep base
Commit 312434617c
("sctp: cache netns in sctp_ep_common") set netns
in asoc and ep base since they're created, and it will never change.
It's a better way to get netns from asoc and ep base, comparing to
calling sock_net().
This patch is to replace them.
v1->v2:
- no change.
Suggested-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
26c97a2d82
commit
4e7696d90b
14 changed files with 49 additions and 62 deletions
|
@ -225,7 +225,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
|
|||
if (msg_len >= first_len) {
|
||||
msg->can_delay = 0;
|
||||
if (msg_len > first_len)
|
||||
SCTP_INC_STATS(sock_net(asoc->base.sk),
|
||||
SCTP_INC_STATS(asoc->base.net,
|
||||
SCTP_MIB_FRAGUSRMSGS);
|
||||
} else {
|
||||
/* Which may be the only one... */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue