svn commit: r331552 - stable/11/sys/vm
Mark Johnston
markj at FreeBSD.org
Mon Mar 26 15:19:46 UTC 2018
Author: markj
Date: Mon Mar 26 15:19:45 2018
New Revision: 331552
URL: https://svnweb.freebsd.org/changeset/base/331552
Log:
MFC r331128:
Have vm_page_replace() assert that the new page is not enqueued.
Modified:
stable/11/sys/vm/vm_page.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/vm/vm_page.c
==============================================================================
--- stable/11/sys/vm/vm_page.c Mon Mar 26 15:17:31 2018 (r331551)
+++ stable/11/sys/vm/vm_page.c Mon Mar 26 15:19:45 2018 (r331552)
@@ -1468,7 +1468,9 @@ vm_page_replace(vm_page_t mnew, vm_object_t object, vm
VM_OBJECT_ASSERT_WLOCKED(object);
KASSERT(mnew->object == NULL,
- ("vm_page_replace: page already in object"));
+ ("vm_page_replace: page %p already in object", mnew));
+ KASSERT(mnew->queue == PQ_NONE,
+ ("vm_page_replace: new page %p is on a paging queue", mnew));
/*
* This function mostly follows vm_page_insert() and
@@ -1480,7 +1482,7 @@ vm_page_replace(vm_page_t mnew, vm_object_t object, vm
mnew->pindex = pindex;
mold = vm_radix_replace(&object->rtree, mnew);
KASSERT(mold->queue == PQ_NONE,
- ("vm_page_replace: mold is on a paging queue"));
+ ("vm_page_replace: old page %p is on a paging queue", mold));
/* Keep the resident page list in sorted order. */
TAILQ_INSERT_AFTER(&object->memq, mold, mnew, listq);
More information about the svn-src-all
mailing list