Add page queues locking to vunmapbuf().

Obtained from: sparc64
Approved by:  benno
This commit is contained in:
grehan 2003-01-08 12:29:59 +00:00
parent 7cefd40e0a
commit 8e6417022b
2 changed files with 4 additions and 0 deletions

View File

@ -296,8 +296,10 @@ vunmapbuf(struct buf *bp)
npages = bp->b_npages;
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
npages);
vm_page_lock_queues();
for (pidx = 0; pidx < npages; pidx++)
vm_page_unhold(bp->b_pages[pidx]);
vm_page_unlock_queues();
bp->b_data = bp->b_saveaddr;
}

View File

@ -296,8 +296,10 @@ vunmapbuf(struct buf *bp)
npages = bp->b_npages;
pmap_qremove(trunc_page((vm_offset_t)bp->b_data),
npages);
vm_page_lock_queues();
for (pidx = 0; pidx < npages; pidx++)
vm_page_unhold(bp->b_pages[pidx]);
vm_page_unlock_queues();
bp->b_data = bp->b_saveaddr;
}