From 919218a908ba04ede9d10b3397ca922b843c32ee Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 5 Aug 2008 13:06:35 +0000 Subject: [PATCH] Honor PG_RELEASED when unbusying a page. Fixes ufs file system full problem discovered by Simon Burge. --- sys/rump/librump/rumpkern/vm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/rump/librump/rumpkern/vm.c b/sys/rump/librump/rumpkern/vm.c index 355eb2a0d67f..4df8a7bfe4df 100644 --- a/sys/rump/librump/rumpkern/vm.c +++ b/sys/rump/librump/rumpkern/vm.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm.c,v 1.35 2008/08/04 15:02:16 pooka Exp $ */ +/* $NetBSD: vm.c,v 1.36 2008/08/05 13:06:35 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -507,7 +507,10 @@ uvm_page_unbusy(struct vm_page **pgs, int npgs) KASSERT(pg->flags & PG_BUSY); if (pg->flags & PG_WANTED) wakeup(pg); - pg->flags &= ~(PG_WANTED|PG_BUSY); + if (pg->flags & PG_RELEASED) + uvm_pagefree(pg); + else + pg->flags &= ~(PG_WANTED|PG_BUSY); } }