mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use interruptible wait for blocking recursive unmounts
Now that we allow recursive unmount attempts to be abandoned upon exceeding the retry limit, we should avoid leaving an unkillable thread when a synchronous unmount request was issued against the base filesystem. Reviewed by: kib (earlier revision), mkusick Differential Revision: https://reviews.freebsd.org/D31450
This commit is contained in:
parent
a8c732f4e5
commit
e81e71b0e9
1 changed files with 8 additions and 3 deletions
|
|
@ -2084,10 +2084,15 @@ dounmount(struct mount *mp, uint64_t flags, struct thread *td)
|
|||
* just re-enqueue on the end of the taskqueue.
|
||||
*/
|
||||
if ((flags & MNT_DEFERRED) == 0) {
|
||||
while (!TAILQ_EMPTY(&mp->mnt_uppers)) {
|
||||
while (error == 0 && !TAILQ_EMPTY(&mp->mnt_uppers)) {
|
||||
mp->mnt_kern_flag |= MNTK_TASKQUEUE_WAITER;
|
||||
msleep(&mp->mnt_taskqueue_link, MNT_MTX(mp), 0,
|
||||
"umntqw", 0);
|
||||
error = msleep(&mp->mnt_taskqueue_link,
|
||||
MNT_MTX(mp), PCATCH, "umntqw", 0);
|
||||
}
|
||||
if (error != 0) {
|
||||
MNT_REL(mp);
|
||||
MNT_IUNLOCK(mp);
|
||||
return (error);
|
||||
}
|
||||
} else if (!TAILQ_EMPTY(&mp->mnt_uppers)) {
|
||||
MNT_IUNLOCK(mp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue