diff options
author | alc <alc@FreeBSD.org> | 2002-08-01 17:57:42 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-08-01 17:57:42 +0000 |
commit | 88e0310b1e43af17d20298c79a123bc86313144c (patch) | |
tree | 96e7e2a06c4e0c7da498c229d2aa9367a1486a59 /sys/kern/vfs_bio.c | |
parent | a5dcc1fd3d5e9f463223566c3815b15cd9f304cc (diff) | |
download | FreeBSD-src-88e0310b1e43af17d20298c79a123bc86313144c.zip FreeBSD-src-88e0310b1e43af17d20298c79a123bc86313144c.tar.gz |
o Acquire the page queues lock before calling vm_page_io_finish().
o Assert that the page queues lock is held in vm_page_io_finish().
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 8ccf804..2e664d2 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2944,7 +2944,7 @@ bufdone(struct buf *bp) !(bp->b_ioflags & BIO_ERROR)) { bp->b_flags |= B_CACHE; } - + vm_page_lock_queues(); for (i = 0; i < bp->b_npages; i++) { int bogusflag = 0; int resid; @@ -3012,6 +3012,7 @@ bufdone(struct buf *bp) foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; iosize -= resid; } + vm_page_unlock_queues(); if (obj) vm_object_pip_wakeupn(obj, 0); } @@ -3050,7 +3051,7 @@ vfs_unbusy_pages(struct buf * bp) vm_object_t obj; obj = bp->b_object; - + vm_page_lock_queues(); for (i = 0; i < bp->b_npages; i++) { vm_page_t m = bp->b_pages[i]; @@ -3066,6 +3067,7 @@ vfs_unbusy_pages(struct buf * bp) vm_page_flag_clear(m, PG_ZERO); vm_page_io_finish(m); } + vm_page_unlock_queues(); vm_object_pip_wakeupn(obj, 0); } } |