diff options
author | alc <alc@FreeBSD.org> | 2002-11-27 08:03:24 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-11-27 08:03:24 +0000 |
commit | 132707858e170c7df076d50bb612d40525a281d6 (patch) | |
tree | 6d3603cae47203251b6ec3defb599fb93f2c3fb1 /sys/vm | |
parent | 2dd6370347f838d5eb219b556302052e038a494a (diff) | |
download | FreeBSD-src-132707858e170c7df076d50bb612d40525a281d6.zip FreeBSD-src-132707858e170c7df076d50bb612d40525a281d6.tar.gz |
Hold the page queues lock while performing pmap_page_protect().
Approved by: re (blanket)
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index b71d9c8..68c58aa 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -748,7 +748,7 @@ vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int * object flags. */ clearobjflags = 1; - + vm_page_lock_queues(); TAILQ_FOREACH(p, &object->memq, listq) { vm_page_flag_set(p, PG_CLEANCHK); if ((flags & OBJPC_NOSYNC) && (p->flags & PG_NOSYNC)) @@ -756,6 +756,7 @@ vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int else pmap_page_protect(p, VM_PROT_READ); } + vm_page_unlock_queues(); if (clearobjflags && (tstart == 0) && (tend == object->size)) { struct vnode *vp; @@ -962,13 +963,14 @@ vm_object_pmap_copy_1(vm_object_t object, vm_pindex_t start, vm_pindex_t end) if (object == NULL || (object->flags & OBJ_WRITEABLE) == 0) return; - + vm_page_lock_queues(); for (idx = start; idx < end; idx++) { p = vm_page_lookup(object, idx); if (p == NULL) continue; pmap_page_protect(p, VM_PROT_READ); } + vm_page_unlock_queues(); } #endif |