From 03befad98bf8cbba2878580c7e9495be9ce08465 Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 9 Apr 2003 21:39:29 +0000 Subject: [PATCH] In uvm_map_clean(), only call pgo_put if the object has one. From Quentin Garnier . --- sys/uvm/uvm_map.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 0ac6d0b047a8..875dd64a5948 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.135 2003/03/02 08:57:49 matt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.136 2003/04/09 21:39:29 thorpej Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.135 2003/03/02 08:57:49 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.136 2003/04/09 21:39:29 thorpej Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -2900,8 +2900,11 @@ uvm_map_clean(map, start, end, flags) size = MIN(end, current->end) - start; if (uobj != NULL) { simple_lock(&uobj->vmobjlock); - error = (uobj->pgops->pgo_put)(uobj, offset, - offset + size, flags | PGO_CLEANIT); + if (uobj->pgops->pgo_put != NULL) + error = (uobj->pgops->pgo_put)(uobj, offset, + offset + size, flags | PGO_CLEANIT); + else + error = 0; } start += size; }