vmmeter(): Fix detection of the named swap objects

Noted and reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33549
This commit is contained in:
Konstantin Belousov 2022-01-25 23:03:23 +02:00
parent 4cf9f5d807
commit 0b8643eaf6

View File

@ -243,7 +243,7 @@ vmtotal(SYSCTL_HANDLER_ARGS)
continue;
}
if (object->ref_count == 1 &&
(object->flags & OBJ_ANON) == 0) {
(object->flags & (OBJ_ANON | OBJ_SWAP)) == OBJ_SWAP) {
/*
* Also skip otherwise unreferenced swap
* objects backing tmpfs vnodes, and POSIX or