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:
parent
1c1781ccce
commit
0b1c6c1fc3
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user