Add page queues locking to vunmapbuf().

Approved by:	re (blanket)
This commit is contained in:
Alan Cox 2002-11-24 21:13:34 +00:00
parent 4556abb542
commit 8f2ea21450
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107211

View File

@ -379,8 +379,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;
} }