summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-01-20 09:24:03 +0000
committeralc <alc@FreeBSD.org>2003-01-20 09:24:03 +0000
commit43a8628b32c6dbffadc0cd1ddba3f22fbad79f5c (patch)
treee463d5506b6cd99ef4f170f5b50d6261d0e3822f /sys/vm
parent3d94105a2503d1efd45d8a06f53a0efa630af67e (diff)
downloadFreeBSD-src-43a8628b32c6dbffadc0cd1ddba3f22fbad79f5c.zip
FreeBSD-src-43a8628b32c6dbffadc0cd1ddba3f22fbad79f5c.tar.gz
- Hold the page queues lock around vm_page_hold().
- Assert that the page queues lock rather than Giant is held in vm_page_hold().
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_page.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index bbdc77b..74ba2e7 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -358,7 +358,8 @@ vm_page_io_finish(vm_page_t m)
void
vm_page_hold(vm_page_t mem)
{
- GIANT_REQUIRED;
+
+ mtx_assert(&vm_page_queue_mtx, MA_OWNED);
mem->hold_count++;
}
OpenPOWER on IntegriCloud