git: 9ae138aa5c1e - main - vm_object: check pctrie for empty check
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Apr 2025 19:24:42 UTC
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=9ae138aa5c1e69834e3bd6e350e58e6ef4a3178c commit 9ae138aa5c1e69834e3bd6e350e58e6ef4a3178c Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2025-04-24 19:23:40 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2025-04-24 19:23:40 +0000 vm_object: check pctrie for empty check Check the object pctrie, rather than the memq, to detect an empty object. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49948 --- sys/vm/vm_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index e1a4143458a3..e301114f800a 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -336,7 +336,7 @@ vm_object_set_memattr(vm_object_t object, vm_memattr_t memattr) if (object->type == OBJT_DEAD) return (KERN_INVALID_ARGUMENT); - if (!TAILQ_EMPTY(&object->memq)) + if (!vm_radix_is_empty(&object->rtree)) return (KERN_FAILURE); object->memattr = memattr;