aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2003-10-31 05:18:45 +0000
committerAlan Cox <alc@FreeBSD.org>2003-10-31 05:18:45 +0000
commit2928cef7e13335f7c073c35a24de75225c44bbf9 (patch)
tree4e332bcf4670178770637445542949c4b04e0db3 /sys/vm
parentff04511e0133e301644311f9b8a13df273fe6196 (diff)
Notes
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/swap_pager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index e03321ed70e5..74597b32e376 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -1896,7 +1896,7 @@ done:
static void
swp_pager_meta_free(vm_object_t object, vm_pindex_t index, daddr_t count)
{
- GIANT_REQUIRED;
+
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
if (object->type != OBJT_SWAP)
return;
@@ -1945,7 +1945,6 @@ swp_pager_meta_free_all(vm_object_t object)
{
daddr_t index = 0;
- GIANT_REQUIRED;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
if (object->type != OBJT_SWAP)
return;
@@ -2259,11 +2258,13 @@ found:
/*
* Prevent further allocations on this device.
*/
+ mtx_lock(&sw_dev_mtx);
sp->sw_flags |= SW_CLOSING;
for (dvbase = 0; dvbase < sp->sw_end; dvbase += dmmax) {
swap_pager_avail -= blist_fill(sp->sw_blist,
dvbase, dmmax);
}
+ mtx_unlock(&sw_dev_mtx);
/*
* Page in the contents of the device and close it.