Make no assertions about lock state when the scheduler is stopped.

Change the assert paths in rm, rw, and sx locks to match the lock
and unlock paths.  I did this for mutexes in r306346.

Reported by:	Travis Lane <tlane@isilon.com>
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
This commit is contained in:
vangyzen 2018-11-13 20:48:05 +00:00
parent 1c1781ccce
commit 0b1c6c1fc3
3 changed files with 3 additions and 3 deletions

View File

@ -742,7 +742,7 @@ _rm_assert(const struct rmlock *rm, int what, const char *file, int line)
{
int count;
if (panicstr != NULL)
if (SCHEDULER_STOPPED())
return;
switch (what) {
case RA_LOCKED:

View File

@ -1439,7 +1439,7 @@ __rw_assert(const volatile uintptr_t *c, int what, const char *file, int line)
{
const struct rwlock *rw;
if (panicstr != NULL)
if (SCHEDULER_STOPPED())
return;
rw = rwlock2rw(c);

View File

@ -1416,7 +1416,7 @@ _sx_assert(const struct sx *sx, int what, const char *file, int line)
int slocked = 0;
#endif
if (panicstr != NULL)
if (SCHEDULER_STOPPED())
return;
switch (what) {
case SA_SLOCKED: