git: c383935d0058 - stable/13 - vmmeter(): Fix detection of the named swap objects

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 09 Feb 2022 00:43:35 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=c383935d00581bf52363b82ff2e6b275aad11d65

commit c383935d00581bf52363b82ff2e6b275aad11d65
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-01-25 21:03:23 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-02-09 00:42:44 +0000

    vmmeter(): Fix detection of the named swap objects
    
    (cherry picked from commit 0b8643eaf6e787bac9c33c2ff03d5524cdfd7239)
---
 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 15afd1f23649..31a23f975b0c 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