summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 4ebd0b4..00e178b 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -7445,22 +7445,26 @@ outof_here:
}
}
-static void
+void
sctp_remove_from_wheel(struct sctp_tcb *stcb,
struct sctp_association *asoc,
- struct sctp_stream_out *strq)
+ struct sctp_stream_out *strq,
+ int holds_lock)
{
/* take off and then setup so we know it is not on the wheel */
- SCTP_TCB_SEND_LOCK(stcb);
+ if (holds_lock == 0)
+ SCTP_TCB_SEND_LOCK(stcb);
if (TAILQ_FIRST(&strq->outqueue)) {
/* more was added */
- SCTP_TCB_SEND_UNLOCK(stcb);
+ if (holds_lock == 0)
+ SCTP_TCB_SEND_UNLOCK(stcb);
return;
}
TAILQ_REMOVE(&asoc->out_wheel, strq, next_spoke);
strq->next_spoke.tqe_next = NULL;
strq->next_spoke.tqe_prev = NULL;
- SCTP_TCB_SEND_UNLOCK(stcb);
+ if (holds_lock == 0)
+ SCTP_TCB_SEND_UNLOCK(stcb);
}
static void
@@ -9083,7 +9087,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb,
}
}
}
- sctp_remove_from_wheel(stcb, asoc, strq);
+ sctp_remove_from_wheel(stcb, asoc, strq, 0);
}
if ((giveup) || bail) {
break;
OpenPOWER on IntegriCloud