summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2009-08-09 17:45:03 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2009-08-09 17:45:03 +0000
commit453147a8b596d7a5ada76784122067c4c7dddd21 (patch)
treeccd882efc42daca7e8661fb26954e08c787574c4
parent3d6e9a7c90ab50efceef698fea21419cca924cb1 (diff)
buf_dealloc_mem can be called without B_BUSY. Don't decrement busymapped in that case.
-rw-r--r--sys/kern/vfs_biomem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_biomem.c b/sys/kern/vfs_biomem.c
index f9cfd3e9b28..9ddf246a917 100644
--- a/sys/kern/vfs_biomem.c
+++ b/sys/kern/vfs_biomem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_biomem.c,v 1.11 2009/08/09 14:37:46 art Exp $ */
+/* $OpenBSD: vfs_biomem.c,v 1.12 2009/08/09 17:45:02 art Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
*
@@ -198,7 +198,8 @@ buf_dealloc_mem(struct buf *bp)
bp->b_data = NULL;
if (data) {
- bcstats.busymapped--;
+ if (bp->b_flags & B_BUSY)
+ bcstats.busymapped--;
pmap_kremove((vaddr_t)data, bp->b_bufsize);
pmap_update(pmap_kernel());
}