-/* $OpenBSD: uvm_mmap.c,v 1.135 2016/07/13 15:57:35 kettenis Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.136 2016/07/13 17:49:00 kettenis Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
/* MAP_PRIVATE mappings can always write to */
maxprot |= PROT_WRITE;
}
- if ((flags & MAP_ANON) != 0 || (flags & __MAP_NOFAULT) == 0 ||
+ if ((flags & MAP_ANON) != 0 ||
((flags & MAP_PRIVATE) != 0 && (prot & PROT_WRITE) != 0)) {
if (p->p_rlimit[RLIMIT_DATA].rlim_cur < size ||
p->p_rlimit[RLIMIT_DATA].rlim_cur - size <
is_anon: /* label for SunOS style /dev/zero */
- if ((flags & MAP_ANON) != 0 || (flags & __MAP_NOFAULT) == 0 ||
+ if ((flags & MAP_ANON) != 0 ||
((flags & MAP_PRIVATE) != 0 && (prot & PROT_WRITE) != 0)) {
if (p->p_rlimit[RLIMIT_DATA].rlim_cur < size ||
p->p_rlimit[RLIMIT_DATA].rlim_cur - size <