diff options
| author | Alan Cox <alc@FreeBSD.org> | 2005-02-26 00:00:14 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2005-02-26 00:00:14 +0000 |
| commit | d12c49bebc775c38dfa05ee2a133b8f29a1c5617 (patch) | |
| tree | 338a9a16cc35f81d8692c64627d2da403635f6fa | |
| parent | 42721de2c30dd4fe5373ebeec5601d6c4f1ad3dc (diff) | |
Notes
| -rw-r--r-- | sys/kern/vfs_cluster.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 453831fe0a4f..d664120e96c5 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -455,7 +455,6 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp) TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head, tbp, b_cluster.cluster_entry); VM_OBJECT_LOCK(tbp->b_object); - vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { vm_page_t m; m = tbp->b_pages[j]; @@ -469,7 +468,6 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp) if ((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) tbp->b_pages[j] = bogus_page; } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(tbp->b_object); /* * XXX shouldn't this be += size for both, like in @@ -934,18 +932,18 @@ cluster_wbuild(vp, size, start_lbn, len) if (tbp->b_flags & B_VMIO) { vm_page_t m; + VM_OBJECT_LOCK(tbp->b_object); if (i != 0) { /* if not first buffer */ for (j = 0; j < tbp->b_npages; j += 1) { m = tbp->b_pages[j]; if (m->flags & PG_BUSY) { + VM_OBJECT_UNLOCK( + tbp->b_object); bqrelse(tbp); goto finishcluster; } } } - if (tbp->b_object != NULL) - VM_OBJECT_LOCK(tbp->b_object); - vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { m = tbp->b_pages[j]; vm_page_io_start(m); @@ -956,9 +954,7 @@ cluster_wbuild(vp, size, start_lbn, len) bp->b_npages++; } } - vm_page_unlock_queues(); - if (tbp->b_object != NULL) - VM_OBJECT_UNLOCK(tbp->b_object); + VM_OBJECT_UNLOCK(tbp->b_object); } bp->b_bcount += size; bp->b_bufsize += size; |
