- 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:
parent
955c424e12
commit
47cec231e3
@ -1180,7 +1180,8 @@ enroll(const char *description, struct lock_class *lock_class)
|
|||||||
{
|
{
|
||||||
struct witness *w;
|
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);
|
return (NULL);
|
||||||
if ((lock_class->lc_flags & LC_SPINLOCK) && witness_skipspin)
|
if ((lock_class->lc_flags & LC_SPINLOCK) && witness_skipspin)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user