From 505fad52f7179e06294f0f421c8162b95a9f23e7 Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Sun, 18 Jul 2004 22:57:46 +0000 Subject: [PATCH] Reverse a lock/unlock pair that were the wrong way around in some code that is obviously not run a lot. (but is in some test cases). This code is not usually run because it covers a case that doesn't happen a lot (removing a node that has data traversing it). --- sys/netgraph/ng_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index cd0e336ba6fd..bf6918168f30 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -2075,9 +2075,9 @@ ng_flush_input_queue(struct ng_queue * ngq) } atomic_add_long(&ngq->q_flags, add_arg); - mtx_lock_spin(&ngq->q_mtx); - NG_FREE_ITEM(item); mtx_unlock_spin(&ngq->q_mtx); + NG_FREE_ITEM(item); + mtx_lock_spin(&ngq->q_mtx); } /* * Take us off the work queue if we are there.