diff options
| author | Alan Cox <alc@FreeBSD.org> | 2004-10-27 02:05:00 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2004-10-27 02:05:00 +0000 |
| commit | df9f17c3dfee1cbf52d378e7ed657cbfc05db438 (patch) | |
| tree | 9ff1af19583d8c36cb90a1bda8ff17cc459097b1 /sys/kern/vfs_cluster.c | |
| parent | 58562ff20c7a1693780735279ee1e25c1191d3b4 (diff) | |
Notes
Diffstat (limited to 'sys/kern/vfs_cluster.c')
| -rw-r--r-- | sys/kern/vfs_cluster.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 7f0701cfaf12..c5f295185590 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -927,17 +927,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]; @@ -950,8 +951,7 @@ cluster_wbuild(vp, size, start_lbn, len) } } 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; |
