summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-05-03 20:31:13 +0000
committerkib <kib@FreeBSD.org>2010-05-03 20:31:13 +0000
commit44c384aeff9f351d68878b89edebf255a4d96fe8 (patch)
tree41e82776e29be9a0454c9f015858821f979ee83e /sys/dev/md/md.c
parent6ca323ef63a448a489c16f9cbb57db639aa48201 (diff)
downloadFreeBSD-src-44c384aeff9f351d68878b89edebf255a4d96fe8.zip
FreeBSD-src-44c384aeff9f351d68878b89edebf255a4d96fe8.tar.gz
Lock the page around vm_page_activate() and vm_page_deactivate() calls
where it was missed. The wrapped fragments now protect wire_count with page lock. Reviewed by: alc
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 78f2af3..edd687f 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -665,11 +665,13 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
sf_buf_free(sf);
sched_unpin();
vm_page_wakeup(m);
+ vm_page_lock(m);
vm_page_lock_queues();
vm_page_activate(m);
if (bp->bio_cmd == BIO_WRITE)
vm_page_dirty(m);
vm_page_unlock_queues();
+ vm_page_unlock(m);
/* Actions on further pages start at offset 0 */
p += PAGE_SIZE - offs;
OpenPOWER on IntegriCloud