Date: Mon, 26 Mar 2018 15:19:45 +0000 (UTC) From: Mark Johnston <markj@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: r331552 - stable/11/sys/vm Message-ID: <201803261519.w2QFJkPZ057633@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803261519.w2QFJkPZ057633>