From nobody Sat Jan 24 00:32:19 2026 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 4dybNS3zkRz6Q1g3 for ; Sat, 24 Jan 2026 00:32:24 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dybNS2g5wz44v8 for ; Sat, 24 Jan 2026 00:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769214744; 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=Lfe1toyBY1vlPCFILFzIVa5sREezfw1UAP0pDc4t13Y=; b=Pho4NEttiUuqcEI5LVNH4InbJLMptmK7Tqp4ISs/ZiLM34KfcQdaGvTh7g7qI0NsVx3Il+ xo7FCfqsPONBez8RUd62WTF2Vdj40WPklPPm3aZZ2+5lScy2JTV1FdbB3FDCrbagb87//J Ow2LW/82u+SUJjdxGilBWhLX/O31hJBKl4ZZP7oQ8UZCUAyBo0K7Q+PLm7T9Mvo8xS1gMl 6Qo9009fUdoFPS+yAyoBtZ5cd6mEs2nkZ5zd4kVgRJKulWUm1AvFG+1hGZsSEera0ipinY UjggfxyB7b18U9qRYB12oy6qrvv3pkaBQKopwN81PQphDkEZMJWdg6J7WcK1bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769214744; 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=Lfe1toyBY1vlPCFILFzIVa5sREezfw1UAP0pDc4t13Y=; b=ZDCsYCEny3qfYPw33K2KCy8xk1jcbcsTixgaK2iQlQSCvLHKS1g/+u+pbPaCNvHWxlO/A2 COM0xH+NNQjRQ17OS7Rm7lcHcFXtHF2Q/cK1gie/iCEHleC76cJ3LJM/riW79i8NeuZB2r gKFW+p3Y/9BbeF7m4R5ualPbySblpf8SjNzylV590Gl5hKfeLhKQSGZI28pCGP6wc9WCR3 X0BhvPmqx4agA8CzGXWSzIib/R2ipu6oxZMFtdTIPgAqTiCAB90+tEo7JLKfvd2Nj1rNWl CL0QORpUwrmfS9HW4ema+nr2T4OkSpgpNGFK+SLQJWrI6XLlLc41R5zhZMw1SA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769214744; a=rsa-sha256; cv=none; b=uVsAFz/f+wjoPSjG6vpb9wnqjzp2BMVFhH1bfmuQw2LYc+ACAvMBltYp/g0FV3S4WuxPGd gGCOSJ/1S5F1K4qZc1v+LmYJUbOSC6mP+lYseTcs+RIeaHdBMoPLftFsJm9+M4JSNkP2fF pK/vUwSPayjPBm4+h9D4DC/Nx0D8QfGihC9x2McPLTI63jtyN70mXtSn9IzS0ZUYtoKj1P n8HGTdQq07ZJO7MvHFWUGLqfryLjitnZ+/WlamnuGe/foRtuL3sVUCCaiCPsS8V7XbCmjV /mwNgNAoppwTxeoR0P8/7fi/ZrXRhGxtczFX3KDCujgrne9FB15uvreiYggnGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dybNM22QTzj8b for ; Sat, 24 Jan 2026 00:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b23b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 24 Jan 2026 00:32:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 99fab30f7272 - stable/15 - vm_object_coalesce(): simplify common expression 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 99fab30f7272c3448d11f5e4a0b98e5ecb9de537 Auto-Submitted: auto-generated Date: Sat, 24 Jan 2026 00:32:19 +0000 Message-Id: <69741313.b23b.112e7efa@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=99fab30f7272c3448d11f5e4a0b98e5ecb9de537 commit 99fab30f7272c3448d11f5e4a0b98e5ecb9de537 Author: Konstantin Belousov AuthorDate: 2025-12-18 22:14:29 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-24 00:26:44 +0000 vm_object_coalesce(): simplify common expression (cherry picked from commit e7053d9a126a60b3c0b1348b6c5131b5f2025894) --- sys/vm/vm_object.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index a8ec98f2c98d..36edb279bbce 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2163,7 +2163,7 @@ boolean_t vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, vm_size_t prev_size, vm_size_t next_size, boolean_t reserved) { - vm_pindex_t next_pindex; + vm_pindex_t next_end, next_pindex; if (prev_object == NULL) return (TRUE); @@ -2197,6 +2197,8 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, return (FALSE); } + next_end = next_pindex + next_size; + /* * Account for the charge. */ @@ -2224,14 +2226,13 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, * deallocation. */ if (next_pindex < prev_object->size) - vm_object_page_remove(prev_object, next_pindex, next_pindex + - next_size, 0); + vm_object_page_remove(prev_object, next_pindex, next_end, 0); /* * Extend the object if necessary. */ - if (next_pindex + next_size > prev_object->size) - prev_object->size = next_pindex + next_size; + if (next_end > prev_object->size) + prev_object->size = next_end; #ifdef INVARIANTS /* @@ -2243,7 +2244,7 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, vm_pindex_t pidx; pidx = swap_pager_seek_data(prev_object, next_pindex); - KASSERT(pidx >= next_pindex + next_size, + KASSERT(pidx >= next_end, ("found obj %p pindex %#jx e %#jx %#jx %#jx", prev_object, pidx, (uintmax_t)prev_offset, (uintmax_t)prev_size, (uintmax_t)next_size));