diff options
| author | Michael Tuexen <tuexen@FreeBSD.org> | 2021-11-26 11:53:12 +0000 |
|---|---|---|
| committer | Michael Tuexen <tuexen@FreeBSD.org> | 2021-11-26 11:53:43 +0000 |
| commit | 3c1ba6f394d2711beabc961f0bda10e1212b7ca6 (patch) | |
| tree | 8b61b79f94910bea13d58a2c2cef8bdf8b5818be /sys/netinet/sctp_output.c | |
| parent | 054f5815c5117f54eb8a161bf78ace3656805768 (diff) | |
Diffstat (limited to 'sys/netinet/sctp_output.c')
| -rw-r--r-- | sys/netinet/sctp_output.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index cb8b8030b6ea..9b4c9093512a 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -5832,7 +5832,7 @@ do_a_abort: itsn = sctp_select_initial_TSN(&inp->sctp_ep); initack->init.initial_tsn = htonl(itsn); SCTP_TCB_LOCK(stcb); - atomic_add_int(&asoc->refcnt, -1); + atomic_subtract_int(&asoc->refcnt, 1); } else { SCTP_INP_INCR_REF(inp); SCTP_INP_RUNLOCK(inp); @@ -6648,7 +6648,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, * relock.. to unlock in the iterator timer :-0 */ SCTP_TCB_LOCK(stcb); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); goto no_chunk_output; } else { if (m) { @@ -6720,7 +6720,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, atomic_add_int(&stcb->asoc.refcnt, 1); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, false, SCTP_SO_NOT_LOCKED); - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); goto no_chunk_output; } sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, @@ -12980,7 +12980,7 @@ sctp_lower_sosend(struct socket *so, if (hold_tcblock == 0) { SCTP_TCB_LOCK(stcb); } - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); free_cnt_applied = 0; /* release this lock, otherwise we hang on ourselves */ NET_EPOCH_ENTER(et); @@ -13552,7 +13552,7 @@ dataless_eof: abort_anyway: if (free_cnt_applied) { - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); free_cnt_applied = 0; } SCTP_SNPRINTF(msg, sizeof(msg), @@ -13693,7 +13693,7 @@ out_unlocked: SCTP_TCB_UNLOCK(stcb); } if (stcb && free_cnt_applied) { - atomic_add_int(&stcb->asoc.refcnt, -1); + atomic_subtract_int(&stcb->asoc.refcnt, 1); } #ifdef INVARIANTS if (stcb) { |
