Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Don't set PG_AOBJ on a page unless UVM_OBJ_IS_AOBJ()...
details: https://anonhg.NetBSD.org/src/rev/277eabcfa26d
branches: trunk
changeset: 932919:277eabcfa26d
user: ad <ad%NetBSD.org@localhost>
date: Sun May 17 17:12:28 2020 +0000
description:
Don't set PG_AOBJ on a page unless UVM_OBJ_IS_AOBJ(), otherwise it can
catch pages from e.g. uvm_loanzero_object.
diffstat:
sys/uvm/uvm_page.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diffs (51 lines):
diff -r ca2587497445 -r 277eabcfa26d sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Sun May 17 16:01:06 2020 +0000
+++ b/sys/uvm/uvm_page.c Sun May 17 17:12:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.235 2020/05/17 15:11:57 ad Exp $ */
+/* $NetBSD: uvm_page.c,v 1.236 2020/05/17 17:12:28 ad Exp $ */
/*-
* Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.235 2020/05/17 15:11:57 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.236 2020/05/17 17:12:28 ad Exp $");
#include "opt_ddb.h"
#include "opt_uvm.h"
@@ -220,10 +220,8 @@
if ((pg->flags & PG_STAT) != 0) {
/* Cannot use uvm_pagegetdirty(): not yet in radix tree. */
const unsigned int status = pg->flags & (PG_CLEAN | PG_DIRTY);
- const bool isaobj = (pg->flags & PG_AOBJ) != 0;
- if (!isaobj) {
- KASSERT((pg->flags & PG_FILE) != 0);
+ if ((pg->flags & PG_FILE) != 0) {
if (uobj->uo_npages == 0) {
struct vnode *vp = (struct vnode *)uobj;
mutex_enter(vp->v_interlock);
@@ -285,10 +283,8 @@
if ((pg->flags & PG_STAT) != 0) {
/* Cannot use uvm_pagegetdirty(): no longer in radix tree. */
const unsigned int status = pg->flags & (PG_CLEAN | PG_DIRTY);
- const bool isaobj = (pg->flags & PG_AOBJ) != 0;
- if (!isaobj) {
- KASSERT((pg->flags & PG_FILE) != 0);
+ if ((pg->flags & PG_FILE) != 0) {
if (uobj->uo_npages == 1) {
struct vnode *vp = (struct vnode *)uobj;
mutex_enter(vp->v_interlock);
@@ -1336,7 +1332,7 @@
*/
if (UVM_OBJ_IS_VNODE(obj)) {
pg->flags |= PG_FILE;
- } else {
+ } else if (UVM_OBJ_IS_AOBJ(obj)) {
pg->flags |= PG_AOBJ;
}
uvm_pageinsert_object(obj, pg);
Home |
Main Index |
Thread Index |
Old Index