From nobody Fri Nov 20 10:26:12 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 4jWBM90bR7z71Y2c for ; Fri, 20 Nov 2026 10:26:13 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jWBM86bPYz3Clp for ; Fri, 20 Nov 2026 10:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795170372; 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=sTUgODMgAhoLKfpxoQ78GR52rF3XdskKAl76ikjcXHI=; b=O243J6Ap/JDCLQgEmoL+8oYCtXwTTUvHPI74geMvP1UTWhsRlrwaBKIYg4BKAJHI2dvK6a krRj1YyyK+I+/x4NT90OKRY57StUkMOMAY5YGeHKp52WWwbe98FFg45pqME0vxztWYQ9hv H0OxSX/C2Dq4/qnGkMsz5WSZI5pYsTyAoRDyubvKWnu39cuZEf1vLURQSosQ9+BAQlf4V/ 0ZkUnBF/ox6ProMVgIeLUmPv41vnT3pFfaCjBGtJFKGztJ9nDTCSCsNHV7ejvRygkkPQdc f9nc6/L+q5EKGWDcHXuJuINnIlkl1nvx/tylTSpAoxaUm2cLlke9jobz/muqsQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795170372; b=hveOE5AiDpX+B/1VtKtrv+aDfSbrcuMfYK++S6lPZYIqXXSUYUklLE9HGxejxcKVW+h6Tu 6wLEzscMLcSGSveIKdwHsDxyl62ErA09mu/ChSTsPbtLwFbnk8fWBBnS1Ghl2BSKS2Gc4+ PowdS0PEPziSi71L6jjgO7MbMh0xPKIVIWUP+8kbcfmyH/zHRXHHg3cM+GefNT5FzaAkpx NlRMMdm4AOjOpB/hqsKAoqZQkERNy2lWxLlLr150d8IbZPaDbnj7WCqz2BPUgjvk2MZ7W1 y9q36t4GPrAH5OjQ4qqoedapwRXjRdRoCkHgFeGpEey+v1IXa7bqEqZ1iImUMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795170372; 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=sTUgODMgAhoLKfpxoQ78GR52rF3XdskKAl76ikjcXHI=; b=Lnl2BVXl7/KXX9WGEnpN4GYx/YCfZG6imrtJ0EWyiYt0XBgb1vRpf1uMS20dMHTlxJxE6M nzc03o4X51bUUEFo2q5zCLZt5Wi9axu5abGB3AjT5GJ9+gSRMvBDgeDZAB7YSEE98UsANC zXbd8YG1n/hyr3CAaXZBCgVXjnes2XmfRnnq/HiWNmGlVjl+aZpSRv6lI//xkaHL1SaHpi JLgDb7Y28+J9EUloVvjpK76kwC73xIHHKpG2p//rDg+VjjsjAOYamxN79G+gk1vEI7VQNE 83XgxRWpXbZO7kkuZejtPA/TeA+vSKWRk7BrvJiYiFemdujnClkTg6ND8HfSWg== 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 4jWBM864kPzlNC for ; Fri, 20 Nov 2026 10:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 191c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 10:26:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 3f10dc83c790 - stable/14 - swapoff: release vnode held since swapon List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f10dc83c790e7ae07e2424e8e73e57f839a3e19 Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 10:26:12 +0000 Message-Id: <6b002044.191c8.54f2db41@gitrepo.freebsd.org> The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3f10dc83c790e7ae07e2424e8e73e57f839a3e19 commit 3f10dc83c790e7ae07e2424e8e73e57f839a3e19 Author: Brooks Davis AuthorDate: 2026-11-16 09:57:24 +0000 Commit: Brooks Davis CommitDate: 2026-11-20 10:25:42 +0000 swapoff: release vnode held since swapon kern_swapon looks up the proposed swap path and aquires a vnode which is held (unlocked) throughout the life of the swap device. In the device case (swapgeom) it was never released in the swapoff path. Remove an incorrect comment about swapgeom_close being called from biodone. It is only called directly via swapoff(2) or at the end of the shutdown path. Reviewed by: kib, markj Reported by: llm-postcr MFC after: 3 days Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D61465 (cherry picked from commit 933f5f616a8a44b7af6cdccecf959ef1e8bab66e) --- sys/vm/swap_pager.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 18eb251070d8..13407f79d282 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2959,13 +2959,14 @@ swapgeom_close(struct thread *td, struct swdevt *sw) sw->sw_id = NULL; mtx_unlock(&sw_dev_mtx); - /* - * swapgeom_close() may be called from the biodone context, - * where we cannot perform topology changes. Delegate the - * work to the events thread. - */ if (cp != NULL) g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); + + /* + * Release the reference added by kern_swapon when resolving the + * vnode. + */ + vrele(sw->sw_vp); } static int