diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 11d025bd603..f1704f83415 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -264,15 +264,9 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_size_t size, int flags, { struct vm_domainset_iter di; vm_offset_t addr; - int domain, iflags; + int domain; - /* - * Do not allow the domainset iterator to override wait flags. The - * contiguous memory allocator defines special semantics for M_WAITOK - * that do not match the iterator's implementation. - */ - iflags = (flags & ~M_WAITOK) | M_NOWAIT; - vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { addr = kmem_alloc_attr_domain(domain, size, flags, low, high, memattr); @@ -352,15 +346,9 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_size_t size, int flags, { struct vm_domainset_iter di; vm_offset_t addr; - int domain, iflags; + int domain; - /* - * Do not allow the domainset iterator to override wait flags. The - * contiguous memory allocator defines special semantics for M_WAITOK - * that do not match the iterator's implementation. - */ - iflags = (flags & ~M_WAITOK) | M_NOWAIT; - vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { addr = kmem_alloc_contig_domain(domain, size, flags, low, high, alignment, boundary, memattr);