From nobody Fri Nov 20 09:30:29 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 4jW96s63ZYz71Qfx for ; Fri, 20 Nov 2026 09:30:29 +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 4jW96s1TkQz4nPQ for ; Fri, 20 Nov 2026 09:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795167029; 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=Oc5v8S9Hw1XthSyXf1puo9uodF6td/uEnC+v4ihHIp8=; b=jbAhfh3BXFh43g27AtE87qMghH7XPU4ptoh4AToOM+HaDe23KVsGrcJBt6Uck4aC3NXIfz Nh2sfUoRvjemWqKkEPA+deVUCLmRD6jtHPBqaaTv0tor49Ql+umJUTS7Biho81yVPCichy L+ib8YvEcdpENPnSG+9klzVyW5IjJ/+FvdkkCWJdz370VtE+sIGzBFiUyZqhv3dBLzl50h HkVpwuaQfp09XIpt7lz5VZ4i150SE2Xn9t20ZbobSChTr82PSypcikUTArO706+RY0UxwE QXfTsVfeuLPhUUiYuKrpSN1ggCvNZkCR8bNJ7Sd+UcSNMmi96Ncm8bWp1d8Z3Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795167029; b=lPhwuo48yxirvlOAInoZVudIA4fUM4BVarc6Ms/x7mTzx5DUdGbeg3dGriUi/ARqj4Aw53 8qV0PTK75DPGSukStcAXu3bUtmJ+E0WPm9Gy09BvZhl1GN1RbaFUSBu4q5OS5LxAfDRRuL nuvVD+zQfkFfuFqaR5UEd17NyXWPfI4inrHmhJPkjUsmqxafC7UmkUFVvqvKyFRKf6K9Po xSnoUvpcuSrukp8sTpFbF0PSV68nwNvUFF6ZocEwUztX3fAWRXLQzYQv3/bwhbgzdXRzCF S8DWYYsjg3mlZN5oPM6SZSJKzxG5tY/FglGtw/VJ1l9dG6C00M0OHZ6bbXqH0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795167029; 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=Oc5v8S9Hw1XthSyXf1puo9uodF6td/uEnC+v4ihHIp8=; b=dBueE3VJUmkBitxcZQXzgm6YzwxwbubHFrukq+h2g6fxWIzAW5O4BkZSeCtXzVu3mOKpyB D/JVSCAPiQGV4ztP3rBoWZATo3TplyD4j/nStLxmz06/zBQTt1hZQBp5cJmQkqPt1GoDZS CTzR8lvLA80v4RsNLgtrfBaHM1PC0ZuXwbthk2LzEUQB42jBn+Qt39CylKzTPRcs37ndG3 2jpSt3UutNykPkley94fAuqc4RcPcC5+Rg9aqIxcjJLal7mGQwZ5zMg+24KFSbut0Wu4Um o2mX5HriNYcQlONtFyBiHLvO8tDmb13TOwUvx7Ozkx7I8JnuwDLHmsIx3ABmiA== 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 4jW96s0ykczjJw for ; Fri, 20 Nov 2026 09:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 14258 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 09:30:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: f30c296f200e - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: f30c296f200e63fd77ce364d30c67950cf07fbee Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 09:30:29 +0000 Message-Id: <6b001335.14258.5ce04a8f@gitrepo.freebsd.org> The branch stable/15 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f30c296f200e63fd77ce364d30c67950cf07fbee commit f30c296f200e63fd77ce364d30c67950cf07fbee Author: Brooks Davis AuthorDate: 2026-11-16 09:57:24 +0000 Commit: Brooks Davis CommitDate: 2026-11-19 21:12:45 +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 2b5fc64de771..3bbc2b8b123c 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3269,13 +3269,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