summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-06-20 23:34:06 +0000
committerjhb <jhb@FreeBSD.org>2001-06-20 23:34:06 +0000
commitc4ce33c0c73fe36cb5f435a31c244b613ec42230 (patch)
tree892f6c81efa67c19f20c311772addb6d93e5c14d /sys
parentcfd6d3b0f954ef362c4020af7d0e4577b571f5cc (diff)
downloadFreeBSD-src-c4ce33c0c73fe36cb5f435a31c244b613ec42230.zip
FreeBSD-src-c4ce33c0c73fe36cb5f435a31c244b613ec42230.tar.gz
Don't lock around swap_pager_swap_init() that is only called once during
the pagedaemon's startup code since it calls malloc which results in lock order reversals.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_pageout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index e8389b1..f4c5670 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1410,6 +1410,7 @@ vm_pageout()
*/
if (vm_pageout_stats_free_max == 0)
vm_pageout_stats_free_max = 5;
+ mtx_unlock(&vm_mtx);
PROC_LOCK(curproc);
curproc->p_flag |= P_BUFEXHAUST;
@@ -1419,6 +1420,7 @@ vm_pageout()
/*
* The pageout daemon is never done, so loop forever.
*/
+ mtx_lock(&vm_mtx);
while (TRUE) {
int error;
int s = splvm();
OpenPOWER on IntegriCloud