summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/vm_machdep.c6
-rw-r--r--sys/i386/i386/vm_machdep.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 14721f3..1f1e400 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/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;
}
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