diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-05-31 16:36:32 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-02 13:56:26 -0400 |
commit | ff356414dc006170153c79434eb81d130c03beec (patch) | |
tree | 55ec0eab1ade81782ef50358fb2ae2739c57251f /net/sctp/sm_make_chunk.c | |
parent | cee360ab4dd66fc1de33a5fa1cb418fa21c27ce3 (diff) | |
download | lwn-ff356414dc006170153c79434eb81d130c03beec.tar.gz lwn-ff356414dc006170153c79434eb81d130c03beec.zip |
sctp: merge sctp_stream_new and sctp_stream_init
Since last patch, sctp doesn't need to alloc memory for asoc->stream any
more. sctp_stream_new and sctp_stream_init both are used to alloc memory
for stream.in or stream.out, and their names are also confusing.
This patch is to merge them into sctp_stream_init, and only pass stream
and streamcnt parameters into it, instead of the whole asoc.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 244181413bca..bd439edf2d8a 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -2454,7 +2454,8 @@ int sctp_process_init(struct sctp_association *asoc, struct sctp_chunk *chunk, * stream sequence number shall be set to 0. */ - if (sctp_stream_init(asoc, gfp)) + if (sctp_stream_init(&asoc->stream, asoc->c.sinit_num_ostreams, + asoc->c.sinit_max_instreams, gfp)) goto clean_up; if (!asoc->temp && sctp_assoc_set_id(asoc, gfp)) |