diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-04 07:00:34 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-04 07:00:34 +0000 |
commit | 13d8de57e2476d3bdbc09bacaa891d1bb6c05733 (patch) | |
tree | 7749dc8ca95e25fdd3131933832311802a3e0b6c /sys | |
parent | 2a2351a07e18adc859600074e036115d910876ee (diff) |
Better diagnostics for locking errors. Fix panic before panic in
acquire_lock_interlocked. Thanks to Grigoriy Orlov for triggering this
one.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index a58b149a59d..109be191854 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.18 2001/03/04 06:46:31 csapuntz Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.19 2001/03/04 07:00:33 csapuntz Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. * @@ -233,9 +233,9 @@ acquire_lock(lk, line) original_line = lk->lkt_line; FREE_LOCK(lk); if (holder == CURPROC->p_pid) - panic("softdep_lock: locking against myself, acquired at line %d", original_line); + panic("softdep_lock: locking against myself, acquired at line %d, relocked at line %d", original_line, line); else - panic("softdep_lock: lock held by %d, acquired at line %d", holder, original_line); + panic("softdep_lock: lock held by %d, acquired at line %d, relocked at line %d", holder, original_line, line); } lk->lkt_spl = splbio(); lk->lkt_held = CURPROC->p_pid; @@ -266,11 +266,11 @@ acquire_lock_interlocked(lk, line) if (lk->lkt_held != -1) { holder = lk->lkt_held; original_line = lk->lkt_line; - FREE_LOCK(lk); + FREE_LOCK_INTERLOCKED(lk); if (holder == CURPROC->p_pid) - panic("softdep_lock: locking against myself, acquired at line %d", original_line); + panic("softdep_lock: locking against myself, acquired at line %d, relocked at line %d", original_line, line); else - panic("softdep_lock: lock held by %d, acquired at line %d", holder, original_line); + panic("softdep_lock: lock held by %d, acquired at line %d, relocked at line %d", holder, original_line, line); } lk->lkt_held = CURPROC->p_pid; lk->lkt_line = line; |