From nobody Mon Nov 16 09:58:46 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 4jSjxL47Kmz6yxD7 for ; Mon, 16 Nov 2026 09:58:46 +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 4jSjxL25BFz4fYf for ; Mon, 16 Nov 2026 09:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794823126; 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=qtU23AHqoLD9D/lPgGI61Yl1sUnQ2LVPUuJ0ThVbZIA=; b=lETsUJYbCvcWLzYatLbSmMQuY32lRFJlEIgJtc20e2gd5oBzdHjzAbAFXrQgWw2olKPvR+ +wW2m3BKI09R4AAb0/C1pMH2t+FwTpI4wRtQcMro5EAwOW6FiMd0N9zSWxob4N1IDykn+T jgAMD5SMJA58uEsSzUkuz7lcTKWa4mfacqikqWySEHkWIdlc7zqBIwg59RcYHDHTM6kiHD W2SbRZchSjunvj44gOHCC0sAImGQ/Iv/DjOYZH3nZ1zTS/2yEPDOELKo2TjWCNB1N3iJ++ SR9HLQs7S9qAKnypUzeKEQAvGGykDNAKVOTzNHM7qDv+Bw3z21t+/3bugy6pbw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794823126; b=vtjPpX3I2NS1EUGTgZ7qZwBtwwqX+AXxwOhFVOxAMPNJzL7bAMVwlowsDF/exLuG4MU70I MVa3feoTLeXQZbeotkay66eHAeMd2wj1ww9ipJ7wD9MyklSQiEAwEMSOxD2Ixz19ZMhBNR D+ai9S4iXSt5586AbRBfeD9Ws8cCROnKXX9p8v9271ERQgMWKD61Dsdk8EqldmzGtlbu72 8nabbFvDiuLYGrD7HCJVGS9TortGOSdn/SPKJwTVdOmwmT0iPQcf8eYtbprBBh1Tfj+q/j dt0Y1c1xAx4OH6sYHCkpPiFQeO1UmlAR6QOOBYsrnJkP+GlTZo5qpsz5X852wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794823126; 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=qtU23AHqoLD9D/lPgGI61Yl1sUnQ2LVPUuJ0ThVbZIA=; b=UlEKc2OG+Dj/t6DHWApuvDBRD3k6yCf8cKgN2VlLPFOa40ic8biI3H7enlC3GRpzvQBZ87 rm9BiJlXqqdSX/0KOoZjSS3v8vv2l0EsEHdXTPwLm6HR+S1tNKjmeMBpL8i0Xq4EddytuH pzU8OvtjSiLPtliQmNHAsp3WgLEduFdzeB60ramsg+KVzWCvloBP8N2HVGcWwZ8qS8wBs8 uEI8d7HW6vq9YyadePT9tcik3h78S/QqN0+sVGBZQ7WKu3c5ptQLZ1/qAl6toLU+Hfl/x3 lOudM2BEZJaFyVPGLWU36m20ZlniU7B3u8RO+rrjJ3TkszznDsTGF9uSyWUy/w== 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 4jSjxL1V6fzpdL for ; Mon, 16 Nov 2026 09:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9d36 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Nov 2026 09:58:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 933f5f616a8a - main - 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/main X-Git-Reftype: branch X-Git-Commit: 933f5f616a8a44b7af6cdccecf959ef1e8bab66e Auto-Submitted: auto-generated Date: Mon, 16 Nov 2026 09:58:46 +0000 Message-Id: <6afad3d6.9d36.4566c0e@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=933f5f616a8a44b7af6cdccecf959ef1e8bab66e commit 933f5f616a8a44b7af6cdccecf959ef1e8bab66e Author: Brooks Davis AuthorDate: 2026-11-16 09:57:24 +0000 Commit: Brooks Davis CommitDate: 2026-11-16 09:57:24 +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 --- 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 175cbe2b1953..3bd0a3545ee6 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3276,13 +3276,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