From 019a2f40ae3f136831bf85b0e3f9b4195b036606 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Mon, 30 Jan 2006 19:25:52 +0000 Subject: [PATCH] Regroup order of operations to better reflect what was probably intended. Submitted by: Peter Jeremy --- sys/kern/kern_rwlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index fcbb6f77193a..f7f227260bc6 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -515,9 +515,9 @@ _rw_assert(struct rwlock *rw, int what, const char *file, int line) * and are asserting a read lock, fail. Also, if no one * has a lock at all, fail. */ - if ((rw->rw_lock == RW_UNLOCKED || - !(rw->rw_lock & RW_LOCK_READ)) && (what == RA_RLOCKED || - (rw_owner(rw) != curthread))) + if (rw->rw_lock == RW_UNLOCKED || + (!(rw->rw_lock & RW_LOCK_READ) && (what == RA_RLOCKED || + rw_owner(rw) != curthread))) panic("Lock %s not %slocked @ %s:%d\n", rw->rw_object.lo_name, (what == RA_RLOCKED) ? "read " : "", file, line);