aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_output.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2017-09-21 11:56:31 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2017-09-21 11:56:31 +0000
commitcdd2d7d4a5212c54009241b1088777f07588730b (patch)
tree6c8bcefcb7ece384ec7a357a4b046d2d99318994 /sys/netinet/sctp_output.c
parentef0c8428f942dcef6a6f13e186bcda97263396e6 (diff)
downloadsrc-cdd2d7d4a5212c54009241b1088777f07588730b.tar.gz
src-cdd2d7d4a5212c54009241b1088777f07588730b.zip
Code cleanup, no functional change.
MFC after: 1 week
Notes
Notes: svn path=/head/; revision=323861
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index c292b3a976c3..3511ad859dbc 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -5491,7 +5491,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
struct sockaddr *src, struct sockaddr *dst,
struct sctphdr *sh, struct sctp_init_chunk *init_chk,
uint8_t mflowtype, uint32_t mflowid,
- uint32_t vrf_id, uint16_t port, int hold_inp_lock)
+ uint32_t vrf_id, uint16_t port)
{
struct sctp_association *asoc;
struct mbuf *m, *m_tmp, *m_last, *m_cookie, *op_err;
@@ -5839,10 +5839,6 @@ do_a_abort:
} else {
uint32_t vtag, itsn;
- if (hold_inp_lock) {
- SCTP_INP_INCR_REF(inp);
- SCTP_INP_RUNLOCK(inp);
- }
if (asoc) {
atomic_add_int(&asoc->refcnt, 1);
SCTP_TCB_UNLOCK(stcb);
@@ -5862,12 +5858,12 @@ do_a_abort:
SCTP_TCB_LOCK(stcb);
atomic_add_int(&asoc->refcnt, -1);
} else {
+ SCTP_INP_INCR_REF(inp);
+ SCTP_INP_RUNLOCK(inp);
vtag = sctp_select_a_tag(inp, inp->sctp_lport, sh->src_port, 1);
initack->init.initiate_tag = htonl(vtag);
/* get a TSN to use too */
initack->init.initial_tsn = htonl(sctp_select_initial_TSN(&inp->sctp_ep));
- }
- if (hold_inp_lock) {
SCTP_INP_RLOCK(inp);
SCTP_INP_DECR_REF(inp);
}