git: 70b2996120a7 - main - vm_map: Simplify a call to vm_object_allocate_anon()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Jul 2022 13:10:40 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=70b2996120a7f96527ce5c676f938886e8aa292d commit 70b2996120a7f96527ce5c676f938886e8aa292d Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-07-12 12:53:17 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-07-12 13:10:15 +0000 vm_map: Simplify a call to vm_object_allocate_anon() vm_object_allocate_anon() automatically sets "charge" to 0 if no cred reference is provided, so the caller doesn't need any conditional logic. No functional change intended. Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35781 --- sys/vm/vm_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 93182051abb7..7e528fae7453 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -5062,7 +5062,7 @@ RetryLookupLocked: if (vm_map_lock_upgrade(map)) goto RetryLookup; entry->object.vm_object = vm_object_allocate_anon(atop(size), - NULL, entry->cred, entry->cred != NULL ? size : 0); + NULL, entry->cred, size); entry->offset = 0; entry->cred = NULL; vm_map_lock_downgrade(map);