Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Oct 2016 11:33:42 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r307855 - stable/11/sys/vm
Message-ID:  <201610241133.u9OBXg7h093475@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Oct 24 11:33:42 2016
New Revision: 307855
URL: https://svnweb.freebsd.org/changeset/base/307855

Log:
  MFC r307501:
  If vm_fault_hold(9) finds that fs.m is wired, do not free it after a
  pager error, leave the page to the wire owner.

Modified:
  stable/11/sys/vm/vm_fault.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_fault.c
==============================================================================
--- stable/11/sys/vm/vm_fault.c	Mon Oct 24 11:28:54 2016	(r307854)
+++ stable/11/sys/vm/vm_fault.c	Mon Oct 24 11:33:42 2016	(r307855)
@@ -722,7 +722,10 @@ vnode_locked:
 			 */
 			if (rv == VM_PAGER_ERROR || rv == VM_PAGER_BAD) {
 				vm_page_lock(fs.m);
-				vm_page_free(fs.m);
+				if (fs.m->wire_count == 0)
+					vm_page_free(fs.m);
+				else
+					vm_page_xunbusy_maybelocked(fs.m);
 				vm_page_unlock(fs.m);
 				fs.m = NULL;
 				unlock_and_deallocate(&fs);
@@ -742,7 +745,10 @@ vnode_locked:
 			 */
 			if (fs.object != fs.first_object) {
 				vm_page_lock(fs.m);
-				vm_page_free(fs.m);
+				if (fs.m->wire_count == 0)
+					vm_page_free(fs.m);
+				else
+					vm_page_xunbusy_maybelocked(fs.m);
 				vm_page_unlock(fs.m);
 				fs.m = NULL;
 			}



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