summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-11-24 21:37:02 +0000
committeralc <alc@FreeBSD.org>2002-11-24 21:37:02 +0000
commit7aa057786e697b9fd19d61994476c659b8cb514a (patch)
treebe7781b0625e6381db8b43d7a954de61637f7732 /sys/i386
parent91507c53d54a6c48f11c5bf79ca4978beba61a54 (diff)
downloadFreeBSD-src-7aa057786e697b9fd19d61994476c659b8cb514a.zip
FreeBSD-src-7aa057786e697b9fd19d61994476c659b8cb514a.tar.gz
Add page queues locking to vunmapbuf(); reduce differences with respect
to the sparc64 implementation. (Note: With modest effort on the alpha and ia64 this function could migrate to the MI part of the kernel.) Approved by: re (blanket)
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/vm_machdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index 14721f3..1f1e400 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -481,7 +481,6 @@ vunmapbuf(bp)
{
int pidx;
int npages;
- vm_page_t *m;
GIANT_REQUIRED;
@@ -491,9 +490,10 @@ vunmapbuf(bp)
npages = bp->b_npages;
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
npages);
- m = bp->b_pages;
+ vm_page_lock_queues();
for (pidx = 0; pidx < npages; pidx++)
- vm_page_unhold(*m++);
+ vm_page_unhold(bp->b_pages[pidx]);
+ vm_page_unlock_queues();
bp->b_data = bp->b_saveaddr;
}
OpenPOWER on IntegriCloud