m_uiotombuf_nomap(): Stop clearing PG_ZERO in newly allocated pages

The caller should not be passing M_ZERO in the first place, so PG_ZERO
will not be preserved by the page allocator and clearing it accomplishes
nothing.

Reviewed by:	gallatin, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28808
This commit is contained in:
Mark Johnston 2021-02-22 10:03:37 -05:00
parent a0ba293c2f
commit 608c44f96e

View File

@ -1656,6 +1656,7 @@ m_uiotombuf_nomap(struct uio *uio, int how, int len, int maxseg, int flags)
VM_ALLOC_WIRED;
MPASS((flags & M_PKTHDR) == 0);
MPASS((how & M_ZERO) == 0);
/*
* len can be zero or an arbitrary large value bound by
@ -1709,7 +1710,6 @@ m_uiotombuf_nomap(struct uio *uio, int how, int len, int maxseg, int flags)
goto retry_page;
}
}
pg_array[i]->flags &= ~PG_ZERO;
mb->m_epg_pa[i] = VM_PAGE_TO_PHYS(pg_array[i]);
mb->m_epg_npgs++;
}