diff options
author | alc <alc@FreeBSD.org> | 2003-10-12 18:26:48 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-10-12 18:26:48 +0000 |
commit | bfc309eda84f869134fe8f3b91903e0b6d5fbc02 (patch) | |
tree | 5a5c8973f75d751534a306642d7cd1a0460b014c /sys/kern/vfs_bio.c | |
parent | b436e75e9ad1a501557ad00f72f068575a0b50bf (diff) | |
download | FreeBSD-src-bfc309eda84f869134fe8f3b91903e0b6d5fbc02.zip FreeBSD-src-bfc309eda84f869134fe8f3b91903e0b6d5fbc02.tar.gz |
In vfs_bio_clrbuf(), ignore the state of the object lock if the page is the
"bogus" page.
Found by: tegge
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4504f86..bd27072 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3517,7 +3517,8 @@ vfs_bio_clrbuf(struct buf *bp) if( (bp->b_npages == 1) && (bp->b_bufsize < PAGE_SIZE) && (bp->b_offset & PAGE_MASK) == 0) { mask = (1 << (bp->b_bufsize / DEV_BSIZE)) - 1; - VM_OBJECT_LOCK_ASSERT(bp->b_pages[0]->object, MA_OWNED); + if (bp->b_pages[0] != bogus_page) + VM_OBJECT_LOCK_ASSERT(bp->b_pages[0]->object, MA_OWNED); if ((bp->b_pages[0]->valid & mask) == mask) goto unlock; if (((bp->b_pages[0]->flags & PG_ZERO) == 0) && @@ -3535,7 +3536,8 @@ vfs_bio_clrbuf(struct buf *bp) (u_long)(vm_offset_t)ea, (u_long)(vm_offset_t)bp->b_data + bp->b_bufsize); mask = ((1 << ((ea - sa) / DEV_BSIZE)) - 1) << j; - VM_OBJECT_LOCK_ASSERT(bp->b_pages[i]->object, MA_OWNED); + if (bp->b_pages[i] != bogus_page) + VM_OBJECT_LOCK_ASSERT(bp->b_pages[i]->object, MA_OWNED); if ((bp->b_pages[i]->valid & mask) == mask) continue; if ((bp->b_pages[i]->valid & mask) == 0) { |