From 2bf43e437420ad1fe6915a0e5e91d2b6d999f67d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 20 Oct 2003 04:05:24 +0000 Subject: [PATCH] - Hold the vm object's lock around calls to vm_page_set_validclean(). --- sys/vm/vnode_pager.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 5faad5c88260..16602d7b502e 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -494,13 +494,17 @@ vnode_pager_input_smlfs(object, m) if (error) break; + VM_OBJECT_LOCK(object); vm_page_lock_queues(); vm_page_set_validclean(m, (i * bsize) & PAGE_MASK, bsize); vm_page_unlock_queues(); + VM_OBJECT_UNLOCK(object); } else { + VM_OBJECT_LOCK(object); vm_page_lock_queues(); vm_page_set_validclean(m, (i * bsize) & PAGE_MASK, bsize); vm_page_unlock_queues(); + VM_OBJECT_UNLOCK(object); bzero((caddr_t) kva + i * bsize, bsize); } }