svn commit: r324606 - head/sys/compat/linuxkpi/common/src

Mark Johnston markj at FreeBSD.org
Fri Oct 13 19:27:35 UTC 2017


Author: markj
Date: Fri Oct 13 19:27:33 2017
New Revision: 324606
URL: https://svnweb.freebsd.org/changeset/base/324606

Log:
  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

Modified:
  head/sys/compat/linuxkpi/common/src/linux_schedule.c

Modified: head/sys/compat/linuxkpi/common/src/linux_schedule.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_schedule.c	Fri Oct 13 18:30:32 2017	(r324605)
+++ head/sys/compat/linuxkpi/common/src/linux_schedule.c	Fri Oct 13 19:27:33 2017	(r324606)
@@ -232,9 +232,7 @@ linux_wait_event_common(wait_queue_head_t *wqh, wait_q
 	 * 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_q
 		sleepq_release(task);
 		ret = linux_signal_pending_state(state, task) ? -ERESTARTSYS : 0;
 	}
-#ifndef NO_SWAPPING
 	PRELE(task->task_thread->td_proc);
-#endif
 
 	PICKUP_GIANT();
 


More information about the svn-src-head mailing list