From 0b8643eaf6e787bac9c33c2ff03d5524cdfd7239 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 25 Jan 2022 23:03:23 +0200 Subject: [PATCH] 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 --- sys/vm/vm_meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index d6d2fe72df89..8f3245b1511f 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -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