summaryrefslogtreecommitdiffstats
path: root/sys/vm/swap_pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/swap_pager.c')
-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 d5e942e..319811a 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -836,7 +836,7 @@ swap_pager_freespace(vm_object_t object, vm_pindex_t start, vm_size_t size)
* SWAP_PAGER_RESERVE() - reserve swap blocks in object
*
* Assigns swap blocks to the specified range within the object. The
- * swap blocks are not zerod. Any previous swap assignment is destroyed.
+ * swap blocks are not zeroed. Any previous swap assignment is destroyed.
*
* Returns 0 on success, -1 on failure.
*/
@@ -1855,7 +1855,8 @@ retry:
if (swapblk == SWAPBLK_NONE)
goto done;
- swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT);
+ swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT |
+ (curproc == pageproc ? M_USE_RESERVE : 0));
if (swap == NULL) {
mtx_unlock(&swhash_mtx);
VM_OBJECT_WUNLOCK(object);
OpenPOWER on IntegriCloud