Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Apr 2020 18:47:16 +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-12@freebsd.org
Subject:   svn commit: r359664 - stable/12/sys/kern
Message-ID:  <202004061847.036IlGFH044495@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Apr  6 18:47:15 2020
New Revision: 359664
URL: https://svnweb.freebsd.org/changeset/base/359664

Log:
  MFC r359464:
  buffer pager: skip bogus pages.
  
  PR:	244713

Modified:
  stable/12/sys/kern/vfs_bio.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/vfs_bio.c
==============================================================================
--- stable/12/sys/kern/vfs_bio.c	Mon Apr  6 18:45:05 2020	(r359663)
+++ stable/12/sys/kern/vfs_bio.c	Mon Apr  6 18:47:15 2020	(r359664)
@@ -5185,13 +5185,17 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, int 
 	    != 0) ? GB_UNMAPPED : 0;
 	VM_OBJECT_WLOCK(object);
 again:
-	for (i = 0; i < count; i++)
-		vm_page_busy_downgrade(ma[i]);
+	for (i = 0; i < count; i++) {
+		if (ma[i] != bogus_page)
+			vm_page_busy_downgrade(ma[i]);
+	}
 	VM_OBJECT_WUNLOCK(object);
 
 	lbnp = -1;
 	for (i = 0; i < count; i++) {
 		m = ma[i];
+		if (m == bogus_page)
+			continue;
 
 		/*
 		 * Pages are shared busy and the object lock is not
@@ -5263,6 +5267,8 @@ end_pages:
 	VM_OBJECT_WLOCK(object);
 	redo = false;
 	for (i = 0; i < count; i++) {
+		if (ma[i] == bogus_page)
+			continue;
 		vm_page_sunbusy(ma[i]);
 		ma[i] = vm_page_grab(object, ma[i]->pindex, VM_ALLOC_NORMAL);
 



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