From nobody Tue Jul 19 13:48:15 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LnKsq5kG2z4XLZm; Tue, 19 Jul 2022 13:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LnKsq5BDLz3VTn; Tue, 19 Jul 2022 13:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658238495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G54XOtboZ+bJYhyfY8NVDT0OItbrEZDgYMBcpYXWJ1s=; b=ybIJ+q3tgOLkNCvRz9N6ZOMkcF87Tcmd0udiN650bL6KqljSGfFIt6+SSFTd0c4Ov1/CKY XuPgwI1VRjaD7em3j0dSEeUubyaUGfqwBDzQ27bII94Jf/9TAEOHqr0uWdZhYK/FOdOYIN eIxNzcJmFzfnilVqKkR8jq8T4Co9Ytu0ClC6tXZ5hXAp6S4kE151/BnJNvWXTxFvvkML7J mMJ9haA64b4cDB2KNzJhbw/1wIBOiMuvhpii/njmgGqfllpI6Xh1aTAOcvuU9ez0PUwkpq S8Cob3UBGEXqiUIcGFjK8wx6WIa8eeeY/AmLUy5UsZZwLZOY+yfsd+b9hK/sog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LnKsq48NSzLmw; Tue, 19 Jul 2022 13:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26JDmFfC024549; Tue, 19 Jul 2022 13:48:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26JDmFmU024548; Tue, 19 Jul 2022 13:48:15 GMT (envelope-from git) Date: Tue, 19 Jul 2022 13:48:15 GMT Message-Id: <202207191348.26JDmFmU024548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 709550b451e3 - stable/13 - vm_map: Simplify a call to vm_object_allocate_anon() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 709550b451e3e2ac8a1bf49c3d8d5f45aea92281 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658238495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G54XOtboZ+bJYhyfY8NVDT0OItbrEZDgYMBcpYXWJ1s=; b=BqPcIPsJQu4s+pAWIGnRQaLxI5mPgPQELCYGNJGDcvEGrg9ao5C6ERWLPs5c3IOEFC7cFQ dH4Nxvddj9daaiE6CDpHXb9gdxIrMUeRvdKY7zLxEaN5rb/cE4yGApwCB9MHJXTpEDZpKh ZnQuOcoWD8qvsh+M8yFARJ+j0kbqK3/bMkG+6tbiKA9eQfr9UcYGrst4d+JuZxhHDXQB4M EG9jbha8lw5tP+qAbkPdvilWG21ieVFVCt264w/jwYfv3eM6O/RI6I8NAmJiJlcyOPrFpp UpbkV1AhRefn/9VQmCqCjckO+abooEUVg4XSNNL9tvF/Ften2U9j+GB1lW05Yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658238495; a=rsa-sha256; cv=none; b=u2FeLGMsMlhodyFuOVbJ5m0rQ7kcrs2EhUKgCnFWJtlHJYsB/wDLN6VdUBeA3ohNOUxpK2 RloQTpSKVG8Tk2zW9yLJDsB4VzIufqNgDLbECf+OQrYsht0CVhhq3lw/pql0+uaa0kAaaE WeNY07qTJ/1Ky+E/N0PlOVVMnalGz34MNaJEiLoNfKfjXnzL6FrmaY72WQs8b7+OPyO6wZ NyC7ryP9GZwm8sWi38B2JWCuQ66taz1Deh9Azmd9yBQCLlk60AEUVSvK6P10P9LFUNzn0M PEmzZH2iZ1M8aVJZmn0/nsAl1pWjLFwkgGaoqNj3lPdt1mMyuK3Fzt/lu+yLMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=709550b451e3e2ac8a1bf49c3d8d5f45aea92281 commit 709550b451e3e2ac8a1bf49c3d8d5f45aea92281 Author: Mark Johnston AuthorDate: 2022-07-12 12:53:17 +0000 Commit: Mark Johnston CommitDate: 2022-07-19 13:36:21 +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 Sponsored by: The FreeBSD Foundation (cherry picked from commit 70b2996120a7f96527ce5c676f938886e8aa292d) --- 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 83b9811fae6c..fa57cea48dae 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);