softdep_unmount: handle spurious wakeups
Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D29178
This commit is contained in:
parent
fabbc3d879
commit
d7e5e37416
@ -2805,10 +2805,13 @@ softdep_unmount(mp)
|
||||
ACQUIRE_LOCK(ump);
|
||||
ump->softdep_flags |= FLUSH_EXIT;
|
||||
wakeup(&ump->softdep_flushtd);
|
||||
msleep(&ump->softdep_flags, LOCK_PTR(ump), PVM | PDROP,
|
||||
"sdwait", 0);
|
||||
while ((ump->softdep_flags & FLUSH_EXIT) != 0) {
|
||||
msleep(&ump->softdep_flags, LOCK_PTR(ump), PVM,
|
||||
"sdwait", 0);
|
||||
}
|
||||
KASSERT((ump->softdep_flags & FLUSH_EXIT) == 0,
|
||||
("Thread shutdown failed"));
|
||||
FREE_LOCK(ump);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user