diff options
author | alc <alc@FreeBSD.org> | 2003-11-15 08:45:36 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-11-15 08:45:36 +0000 |
commit | 0e7d8d9c5196ef34c88a203661fdb0df5272e50a (patch) | |
tree | 28fdf7217cd04090e8272c9530262a98720d45db | |
parent | be190686facf06b6d4f95d361bd17d2f335766a3 (diff) | |
download | FreeBSD-src-0e7d8d9c5196ef34c88a203661fdb0df5272e50a.zip FreeBSD-src-0e7d8d9c5196ef34c88a203661fdb0df5272e50a.tar.gz |
- Remove the remaining now unnecessary checks for the buf's b_object being
NULL. See revision 1.421 for more detail.
- Remove GIANT_REQUIRED from vfs_unbusy_pages(). Discussed with: jeff
-rw-r--r-- | sys/kern/vfs_bio.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index e4a7bd5..6fea80b 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1553,8 +1553,7 @@ vfs_vmio_release(bp) vm_page_t m; GIANT_REQUIRED; - if (bp->b_object != NULL) - VM_OBJECT_LOCK(bp->b_object); + VM_OBJECT_LOCK(bp->b_object); vm_page_lock_queues(); for (i = 0; i < bp->b_npages; i++) { m = bp->b_pages[i]; @@ -1592,8 +1591,7 @@ vfs_vmio_release(bp) } } vm_page_unlock_queues(); - if (bp->b_object != NULL) - VM_OBJECT_UNLOCK(bp->b_object); + VM_OBJECT_UNLOCK(bp->b_object); pmap_qremove(trunc_page((vm_offset_t) bp->b_data), bp->b_npages); if (bp->b_bufsize) { @@ -3291,8 +3289,6 @@ vfs_unbusy_pages(struct buf * bp) { int i; - GIANT_REQUIRED; - runningbufwakeup(bp); if (bp->b_flags & B_VMIO) { vm_object_t obj; @@ -3536,8 +3532,7 @@ vfs_bio_clrbuf(struct buf *bp) if ((bp->b_flags & (B_VMIO | B_MALLOC)) == B_VMIO) { bp->b_flags &= ~B_INVAL; bp->b_ioflags &= ~BIO_ERROR; - if (bp->b_object != NULL) - VM_OBJECT_LOCK(bp->b_object); + VM_OBJECT_LOCK(bp->b_object); if( (bp->b_npages == 1) && (bp->b_bufsize < PAGE_SIZE) && (bp->b_offset & PAGE_MASK) == 0) { mask = (1 << (bp->b_bufsize / DEV_BSIZE)) - 1; @@ -3581,8 +3576,7 @@ vfs_bio_clrbuf(struct buf *bp) vm_page_unlock_queues(); } unlock: - if (bp->b_object != NULL) - VM_OBJECT_UNLOCK(bp->b_object); + VM_OBJECT_UNLOCK(bp->b_object); bp->b_resid = 0; } else { clrbuf(bp); |