- 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:
jhb 2004-02-02 22:15:17 +00:00
parent 955c424e12
commit 47cec231e3

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);