diff options
author | alc <alc@FreeBSD.org> | 2003-10-27 05:58:15 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-10-27 05:58:15 +0000 |
commit | f42a987e4ec559eb51957c68f027c8fa5a7012e6 (patch) | |
tree | ded5fe250efc3d705d252bf99607b59c785210bc | |
parent | 367436bcadb7f735a7a85f214623259b18253bb1 (diff) | |
download | FreeBSD-src-f42a987e4ec559eb51957c68f027c8fa5a7012e6.zip FreeBSD-src-f42a987e4ec559eb51957c68f027c8fa5a7012e6.tar.gz |
- Complete the synchronization of accesses to the swblock hash table.
-rw-r--r-- | sys/vm/swap_pager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index fea38e1..2bc4cc3 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) { /* |