]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Permit vm_page_wire() to be called on pages not belonging to an object.
authormarkj <markj@FreeBSD.org>
Tue, 25 Aug 2020 13:45:06 +0000 (13:45 +0000)
committermarkj <markj@FreeBSD.org>
Tue, 25 Aug 2020 13:45:06 +0000 (13:45 +0000)
commita90ef5362e9043f013945b026c5b29390a67dbdb
treea5f58c4cf1344d08d2a55296161692afc2d6f154
parent464df865f8cd7ca5cbac905d3c20ea4011437c85
Permit vm_page_wire() to be called on pages not belonging to an object.

For such pages ref_count is effectively a consumer-managed field, but
there is no harm in calling vm_page_wire() on them.
vm_page_unwire_noq() handles them as well.  Relax the vm_page_wire()
assertions to permit this case which is triggered by some out-of-tree
code. [1]

Also guard a conditional assertion with INVARIANTS.  Otherwise the
conditions are evaluated even though the result is unused. [2]

Reported by: bz, cem [1], kib [2]
Reviewed by: dougm, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26173
sys/vm/vm_page.c