- Assert that witness_cold is not true in enroll().

- Only check witness_watch once in enroll().

Reported by:	ru (2)
This commit is contained in:
John Baldwin 2004-02-02 22:15:17 +00:00
parent 526f81a883
commit 9c9c52a3ed

View File

@ -1180,7 +1180,8 @@ enroll(const char *description, struct lock_class *lock_class)
{
struct witness *w;
if (!witness_watch || witness_watch == 0 || panicstr != NULL)
KASSERT(!witness_cold, ("enroll called too early"));
if (witness_watch == 0 || panicstr != NULL)
return (NULL);
if ((lock_class->lc_flags & LC_SPINLOCK) && witness_skipspin)
return (NULL);