diff options
author | alc <alc@FreeBSD.org> | 2003-04-19 22:11:41 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-04-19 22:11:41 +0000 |
commit | dc48d3db81e4e6fe22622e0d7918174a41a9e4e8 (patch) | |
tree | d9d7d5c327a08db059b8b872181c6a659ee359ca /sys/kern/vfs_bio.c | |
parent | ef4e8a19cfc9fb054dbda2b5efdaef60ef82438c (diff) | |
download | FreeBSD-src-dc48d3db81e4e6fe22622e0d7918174a41a9e4e8.zip FreeBSD-src-dc48d3db81e4e6fe22622e0d7918174a41a9e4e8.tar.gz |
- Lock the vm_object when performing vm_object_pip_subtract().
- Assert that the vm_object lock is held in vm_object_pip_subtract().
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4125781..6fba76f 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3106,6 +3106,8 @@ bufdone(struct buf *bp) KASSERT(bp->b_offset != NOOFFSET, ("biodone: no buffer offset")); + if (obj != NULL) + VM_OBJECT_LOCK(obj); #if defined(VFS_BIO_DEBUG) if (obj->paging_in_progress < bp->b_npages) { printf("biodone: paging in progress(%d) < bp->b_npages(%d)\n", @@ -3194,7 +3196,6 @@ bufdone(struct buf *bp) } vm_page_unlock_queues(); if (obj != NULL) { - VM_OBJECT_LOCK(obj); vm_object_pip_wakeupn(obj, 0); VM_OBJECT_UNLOCK(obj); } |