Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2017 19:27:33 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324606 - head/sys/compat/linuxkpi/common/src
Message-ID:  <201710131927.v9DJRXth061955@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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();
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710131927.v9DJRXth061955>