From eb13174a6b6be159823a147ca01a731b0a75cb3d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 27 Jul 2002 05:08:49 +0000 Subject: [PATCH] o Lock page queue accesses by vm_page_activate() and vm_page_deactivate(). --- sys/fs/specfs/spec_vnops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index f559b796a438..4ccb2db4c7fe 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -760,8 +760,8 @@ spec_getpages(ap) } pmap_qremove(kva, pcount); - gotreqpage = 0; + vm_page_lock_queues(); for (i = 0, toff = 0; i < pcount; i++, toff = nextoff) { nextoff = toff + PAGE_SIZE; m = ap->a_m[i]; @@ -812,6 +812,7 @@ spec_getpages(ap) vm_page_zero_invalid(m, FALSE); } } + vm_page_unlock_queues(); if (!gotreqpage) { m = ap->a_m[ap->a_reqpage]; printf(