diff options
author | dg <dg@FreeBSD.org> | 1998-11-11 15:07:57 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1998-11-11 15:07:57 +0000 |
commit | ba58877007d91e681de82ac5e39beeef438e2931 (patch) | |
tree | f30aac07650f75c7bb77bda939b6df0844fda339 /sys | |
parent | b8d56a217a92034563b7b9b54f9efe870969d269 (diff) | |
download | FreeBSD-src-ba58877007d91e681de82ac5e39beeef438e2931.zip FreeBSD-src-ba58877007d91e681de82ac5e39beeef438e2931.tar.gz |
Closed a small race condition between wiring/unwiring pages that involved
the page's wire_count.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_page.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 070ac29..d557b03 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.111 1998/10/28 13:37:02 dg Exp $ + * $Id: vm_page.c,v 1.112 1998/10/28 13:41:43 dg Exp $ */ /* @@ -1230,16 +1230,16 @@ vm_page_wire(m) { int s; + s = splvm(); if (m->wire_count == 0) { - s = splvm(); vm_page_unqueue(m); - splx(s); cnt.v_wire_count++; if (m->object) m->object->wire_count++; } - (*vm_page_queues[PQ_NONE].lcnt)++; m->wire_count++; + splx(s); + (*vm_page_queues[PQ_NONE].lcnt)++; vm_page_flag_set(m, PG_MAPPED); } |