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)
This commit is contained in:
Alan Cox
2002-11-24 21:37:02 +00:00
parent 8f2ea21450
commit 560d1fbc99
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -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;
}
+3 -3
View File
@@ -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;
}