diff options
author | Xin Long <lucien.xin@gmail.com> | 2019-12-09 06:45:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-10 05:14:01 +0100 |
commit | 4e7696d90b51a1a73ce0e8174f3aff58b914619c (patch) | |
tree | f70df63734043ccdfbba56fde42084fa8fb1b19a /net/sctp/stream.c | |
parent | net: sfp: avoid tx-fault with Nokia GPON module (diff) | |
download | linux-4e7696d90b51a1a73ce0e8174f3aff58b914619c.tar.xz linux-4e7696d90b51a1a73ce0e8174f3aff58b914619c.zip |
sctp: get netns from asoc and ep base
Commit 312434617cb1 ("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>
Diffstat (limited to 'net/sctp/stream.c')
-rw-r--r-- | net/sctp/stream.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/stream.c b/net/sctp/stream.c index e83cdaa2ab76..df60b5ef24cb 100644 --- a/net/sctp/stream.c +++ b/net/sctp/stream.c @@ -218,10 +218,9 @@ void sctp_stream_update(struct sctp_stream *stream, struct sctp_stream *new) static int sctp_send_reconf(struct sctp_association *asoc, struct sctp_chunk *chunk) { - struct net *net = sock_net(asoc->base.sk); int retval = 0; - retval = sctp_primitive_RECONF(net, asoc, chunk); + retval = sctp_primitive_RECONF(asoc->base.net, asoc, chunk); if (retval) sctp_chunk_free(chunk); |