diff options
author | alc <alc@FreeBSD.org> | 2002-07-31 07:27:08 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-07-31 07:27:08 +0000 |
commit | b53d53a590ee4b37ffbbc94ba94a79768c7ced26 (patch) | |
tree | d49e59d08a457a2d70c935629da238b02279c1fd /sys/kern/vfs_cluster.c | |
parent | c1cd9e269dc8310bad5c79845579c21d2b902477 (diff) | |
download | FreeBSD-src-b53d53a590ee4b37ffbbc94ba94a79768c7ced26.zip FreeBSD-src-b53d53a590ee4b37ffbbc94ba94a79768c7ced26.tar.gz |
o Lock page accesses by vm_page_io_start() with the page queues lock.
o Assert that the page queues lock is held in vm_page_io_start().
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r-- | sys/kern/vfs_cluster.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 452dfa1..70d2e4e 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -475,6 +475,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp) BUF_KERNPROC(tbp); TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head, tbp, b_cluster.cluster_entry); + vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { vm_page_t m; m = tbp->b_pages[j]; @@ -488,6 +489,7 @@ 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(); /* * XXX shouldn't this be += size for both, like in * cluster_wbuild()? @@ -931,7 +933,7 @@ cluster_wbuild(vp, size, start_lbn, len) } } } - + vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { m = tbp->b_pages[j]; vm_page_io_start(m); @@ -942,6 +944,7 @@ cluster_wbuild(vp, size, start_lbn, len) bp->b_npages++; } } + vm_page_unlock_queues(); } bp->b_bcount += size; bp->b_bufsize += size; |