diff options
author | alc <alc@FreeBSD.org> | 2002-12-20 21:18:29 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-12-20 21:18:29 +0000 |
commit | 31d637dca52ba263b8039cc76549389044885fbc (patch) | |
tree | c4853fc0d7ba64a9d95fe071fbd5796e59174190 /sys | |
parent | cf1d112d8e94856cb07a9f7676e245454e0be679 (diff) | |
download | FreeBSD-src-31d637dca52ba263b8039cc76549389044885fbc.zip FreeBSD-src-31d637dca52ba263b8039cc76549389044885fbc.tar.gz |
Extend the scope of the page queues lock in vm_pgmoveco().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_subr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 07708fc..bfea8bc 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -110,9 +110,8 @@ vm_pgmoveco(mapa, srcobj, kaddr, uaddr) vm_page_busy(user_pg); pmap_remove_all(user_pg); vm_page_free(user_pg); - vm_page_unlock_queues(); - } - + } else + vm_page_lock_queues(); if (kern_pg->busy || ((kern_pg->queue - kern_pg->pc) == PQ_FREE) || (kern_pg->hold_count != 0)|| (kern_pg->flags & PG_BUSY)) { printf("vm_pgmoveco: pindex(%lu), busy(%d), PG_BUSY(%d), " @@ -125,12 +124,13 @@ vm_pgmoveco(mapa, srcobj, kaddr, uaddr) panic("vm_pgmoveco: renaming busy page"); } kpindex = kern_pg->pindex; - vm_page_lock_queues(); vm_page_busy(kern_pg); vm_page_unlock_queues(); vm_page_rename(kern_pg, uobject, upindex); + vm_page_lock_queues(); vm_page_flag_clear(kern_pg, PG_BUSY); kern_pg->valid = VM_PAGE_BITS_ALL; + vm_page_unlock_queues(); vm_map_lookup_done(map, entry); return(KERN_SUCCESS); |