diff options
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index a4ac79b..8befdd5 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/lock.h> #include <sys/kernel.h> +#include <sys/limits.h> #include <sys/malloc.h> #include <sys/mutex.h> #include <sys/proc.h> @@ -2112,13 +2113,16 @@ vm_page_cowclear(vm_page_t m) */ } -void +int vm_page_cowsetup(vm_page_t m) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + if (m->cow == USHRT_MAX - 1) + return (EBUSY); m->cow++; pmap_remove_write(m); + return (0); } #include "opt_ddb.h" |