]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_object: Make is_object_active() global
authorRick Macklem <rmacklem@FreeBSD.org>
Mon, 20 Dec 2021 00:11:44 +0000 (16:11 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Mon, 20 Dec 2021 00:11:44 +0000 (16:11 -0800)
commitcd37afd8b6ddc38fe2441e37a8bf5f8cdce50bc6
tree9175e48a486f70e2e829a39656de9f6966e6b572
parent71d2d5adfe18e80e5f8afeb4f86ef69be1aaad81
vm_object: Make is_object_active() global

Commit 867c27c23a5c modified the NFS client so that
it does IO_APPEND writes directly to the NFS server,
bypassing the buffer cache.  However, this could result
in stale data in client pages when the file is mmap(2)'d.
As such, the NFS client needs to call is_object_active()
to check if the file is mmap(2)'d.

This patch renames is_object_active() to vm_object_is_active(),
moves it to sys/vm/vm_object.c and makes it global, so that
the NFS client can call it in a future commit.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33520
sys/vm/vm_meter.c
sys/vm/vm_object.c
sys/vm/vm_object.h