Make the PHOLD in linux_wait_event_common() unconditional.

After some in-progress work is committed, this would otherwise be the only
instance of #if(n)def NO_SWAPPING in the tree. Moreover, the requisite
opt_vm.h include was missing, so the PHOLD/PRELE calls were always being
compiled in anyway.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2017-10-13 19:27:33 +00:00
parent 7f22b1ffe4
commit 9db0f8e76f

View File

@ -232,9 +232,7 @@ linux_wait_event_common(wait_queue_head_t *wqh, wait_queue_t *wq, int timeout,
* Our wait queue entry is on the stack - make sure it doesn't
* get swapped out while we sleep.
*/
#ifndef NO_SWAPPING
PHOLD(task->task_thread->td_proc);
#endif
sleepq_lock(task);
if (atomic_load_acq_int(&task->state) != TASK_WAKING) {
ret = linux_add_to_sleepqueue(task, "wevent", timeout, state);
@ -242,9 +240,7 @@ linux_wait_event_common(wait_queue_head_t *wqh, wait_queue_t *wq, int timeout,
sleepq_release(task);
ret = linux_signal_pending_state(state, task) ? -ERESTARTSYS : 0;
}
#ifndef NO_SWAPPING
PRELE(task->task_thread->td_proc);
#endif
PICKUP_GIANT();