diff options
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 589bdbd..ec8ad67 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1571,7 +1571,6 @@ vfs_vmio_release(struct buf *bp) * everything on the inactive queue. */ vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); /* * We don't mess with busy pages, it is @@ -1580,6 +1579,7 @@ vfs_vmio_release(struct buf *bp) */ if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && m->wire_count == 0) { + vm_page_lock_queues(); /* * Might as well free the page if we can and it has * no valid data. We also free the page if the @@ -1593,8 +1593,8 @@ vfs_vmio_release(struct buf *bp) } else if (buf_vm_page_count_severe()) { vm_page_try_to_cache(m); } + vm_page_unlock_queues(); } - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); @@ -2957,9 +2957,7 @@ allocbuf(struct buf *bp, int size) bp->b_pages[i] = NULL; vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); |