diff options
author | julian <julian@FreeBSD.org> | 2004-07-18 22:57:46 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-07-18 22:57:46 +0000 |
commit | e43e03089f098c221f35b1d55728ff1efe907c36 (patch) | |
tree | a41c77326dcf01e4acef5ff284e23523a793c1f7 /sys/netgraph/ng_base.c | |
parent | c3ae9c5291e5203002f6b2eb91012f528290a055 (diff) | |
download | FreeBSD-src-e43e03089f098c221f35b1d55728ff1efe907c36.zip FreeBSD-src-e43e03089f098c221f35b1d55728ff1efe907c36.tar.gz |
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).
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r-- | sys/netgraph/ng_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index cd0e336..bf69181 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. |