Add page queues locking to vunmapbuf().
Obtained from: sparc64 Approved by: benno
This commit is contained in:
parent
d2e30522fe
commit
7d13e76928
@ -296,8 +296,10 @@ vunmapbuf(struct buf *bp)
|
|||||||
npages = bp->b_npages;
|
npages = bp->b_npages;
|
||||||
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
|
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
|
||||||
npages);
|
npages);
|
||||||
|
vm_page_lock_queues();
|
||||||
for (pidx = 0; pidx < npages; pidx++)
|
for (pidx = 0; pidx < npages; pidx++)
|
||||||
vm_page_unhold(bp->b_pages[pidx]);
|
vm_page_unhold(bp->b_pages[pidx]);
|
||||||
|
vm_page_unlock_queues();
|
||||||
|
|
||||||
bp->b_data = bp->b_saveaddr;
|
bp->b_data = bp->b_saveaddr;
|
||||||
}
|
}
|
||||||
|
@ -296,8 +296,10 @@ vunmapbuf(struct buf *bp)
|
|||||||
npages = bp->b_npages;
|
npages = bp->b_npages;
|
||||||
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
|
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
|
||||||
npages);
|
npages);
|
||||||
|
vm_page_lock_queues();
|
||||||
for (pidx = 0; pidx < npages; pidx++)
|
for (pidx = 0; pidx < npages; pidx++)
|
||||||
vm_page_unhold(bp->b_pages[pidx]);
|
vm_page_unhold(bp->b_pages[pidx]);
|
||||||
|
vm_page_unlock_queues();
|
||||||
|
|
||||||
bp->b_data = bp->b_saveaddr;
|
bp->b_data = bp->b_saveaddr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user