diff options
author | alc <alc@FreeBSD.org> | 2002-12-27 06:52:32 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-12-27 06:52:32 +0000 |
commit | a221c3d42210dd3ee0ab8e04d36ee6dda21c1278 (patch) | |
tree | 823bf93e876fa2605ac69e59727436adf7e4c40e /sys | |
parent | b9ffe85ed268c0991ac3ab9c47b5a89ae1d58afa (diff) | |
download | FreeBSD-src-a221c3d42210dd3ee0ab8e04d36ee6dda21c1278.zip FreeBSD-src-a221c3d42210dd3ee0ab8e04d36ee6dda21c1278.tar.gz |
Hold the page queues lock when calling vm_page_flag_clear().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 6890642..c44e1c6 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1251,7 +1251,9 @@ brelse(struct buf * bp) int had_bogus = 0; m = bp->b_pages[i]; + vm_page_lock_queues(); vm_page_flag_clear(m, PG_ZERO); + vm_page_unlock_queues(); /* * If we hit a bogus page, fixup *all* the bogus pages @@ -2220,6 +2222,7 @@ vfs_setdirty(struct buf *bp) vm_offset_t boffset; vm_offset_t eoffset; + vm_page_lock_queues(); /* * test the pages to see if they have been modified directly * by users through the VM system. @@ -2247,6 +2250,7 @@ vfs_setdirty(struct buf *bp) } eoffset = ((i + 1) << PAGE_SHIFT) - (bp->b_offset & PAGE_MASK); + vm_page_unlock_queues(); /* * Fit it to the buffer. */ @@ -3440,7 +3444,9 @@ vfs_bio_clrbuf(struct buf *bp) } } bp->b_pages[i]->valid |= mask; + vm_page_lock_queues(); vm_page_flag_clear(bp->b_pages[i], PG_ZERO); + vm_page_unlock_queues(); } bp->b_resid = 0; } else { |