aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2003-10-27 05:58:15 +0000
committerAlan Cox <alc@FreeBSD.org>2003-10-27 05:58:15 +0000
commitd536c58f535360dc432a2d91cc915686d761f4d3 (patch)
treeded5fe250efc3d705d252bf99607b59c785210bc /sys/vm
parentf74fae21b831c30f0af1a315263c5e502dca1aef (diff)
Notes
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/swap_pager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index fea38e1abb96..2bc4cc328d2b 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -1671,6 +1671,7 @@ swp_pager_force_pagein(struct swblock *swap, int idx)
object = swap->swb_object;
pindex = swap->swb_index;
+ mtx_unlock(&swhash_mtx);
VM_OBJECT_LOCK(object);
vm_object_pip_add(object, 1);
@@ -1732,6 +1733,7 @@ full_rescan:
for (i = 0; i <= swhash_mask; i++) { /* '<=' is correct here */
restart:
pswap = &swhash[i];
+ mtx_lock(&swhash_mtx);
while ((swap = *pswap) != NULL) {
for (j = 0; j < SWAP_META_PAGES; ++j) {
v = swap->swb_pages[j];
@@ -1748,6 +1750,7 @@ restart:
}
pswap = &swap->swb_hnext;
}
+ mtx_unlock(&swhash_mtx);
}
if (waitobj && *sw_used) {
/*