From nobody Mon May 20 00:25:30 2024 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 4VjJHv5Cvsz5LKCh; Mon, 20 May 2024 00:25:31 +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 4VjJHv3kzCz4mCx; Mon, 20 May 2024 00:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164731; 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=vt/TEog0k462/HBIS19VngfIyjhZkRdLFpD+z7pUEn4=; b=iaeVCzSI3zevfX0Gs1rOkfAsSO2F6YUQDVLeE28FlHpyqzxcgqxsWR/4xp4a8XqEDohMTZ bXsVcGvQPIfoVc+iR/TUroPZk0Xnl9DNinSpTYO88Eiz+ErEk8r1zp6grR5MaMSMDBp2AI s4t8RjFrVtZJY+CrkaPu3YVtinvJvV7wnYb8uYU7OuVJJ3HmOVTy71oM6PChnfrqxyj1HK tGTVJy6MAUHoNvPfCi2mRjPCbKlhoXlFlffhwTiOwyUcQ+wEMitHAGIU0+dU50zDluxgJY YMeHz3huJtFz0lisWm2gmjljzfSD0RB2/ikgEC0vxDhyvOds9cgOqMssZdvOLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716164731; a=rsa-sha256; cv=none; b=fFMET4BudTtM4Dq8kFOmkXU7V7AhbIF3pa52HzuPGznDEadjJxK3WUXwMEl0y3GBPqcMJp OXRe9TTFjtkIjcwouzAv7dLbXLlm1wdJMaxBvH2k2QVUl9+wqT19IdAA6VuXACZIoh5+kz FzoQMFOvXs4SHgLn9nhDnPg5UPDH+UDKzC38Jvo8JcwzIGomC/O4sQMADHlnXoMF7oES3k NRJEoYiNiLS43mjG5/kEgS1EMufWlOzKGIIT+7xCx4G+43Zq8suNiM+rwrYt/zEjJTUldY gwMGwx32xiE9nFrhbPjTjNixGtGieZ+3HA4pIJe0hLiXKr+QQZcGQej4YPBYLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164731; 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=vt/TEog0k462/HBIS19VngfIyjhZkRdLFpD+z7pUEn4=; b=x3bdfGY4QGc46lEIlD1rOG1ip7Q5vcWAEikjROHNg0kSbty/k9+qW+/3umYYH54JQY7nnH 8KfYqc2jfoZPFLWS8bIyCErt4e8a4klTccZOuC4mdoCkdmKVrIEP3Y33znLYcVqBTJoySy IWNt1FsVJg9MrnZlb49/WArVfkIRIATfZ9SZ7O7i+KEe9g7RfRJRTLTNbzDN7/6gUZNqzn J82lvnJdsZQ+ZPXQK34qtMZZ2G2dhoxAF00qBxsx9fOCMKM5jY9avLeimYYj0uqmqiMiKd w59FB6VWC9UQdu5ZyGGUo6fHDLI76+GVNa5GFLUUbbEp1x1wjM4OsMWQW3PhGg== 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 4VjJHv17tczGrg; Mon, 20 May 2024 00:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K0PUPY008317; Mon, 20 May 2024 00:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K0PUiT008314; Mon, 20 May 2024 00:25:30 GMT (envelope-from git) Date: Mon, 20 May 2024 00:25:30 GMT Message-Id: <202405200025.44K0PUiT008314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2ecfb14781cb - stable/14 - tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode 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/14 X-Git-Reftype: branch X-Git-Commit: 2ecfb14781cb28e359623ffe6e2421b1abe03231 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2ecfb14781cb28e359623ffe6e2421b1abe03231 commit 2ecfb14781cb28e359623ffe6e2421b1abe03231 Author: Konstantin Belousov AuthorDate: 2024-05-06 18:31:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-19 00:57:54 +0000 tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode (cherry picked from commit 58d7ac11e77db28640b8e47f9f9c1fe81d15baf5) --- sys/fs/tmpfs/tmpfs_subr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index ef7fca2ae185..13323d50228a 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1053,15 +1053,19 @@ loop: KASSERT((object->flags & OBJ_TMPFS_VREF) == 0, ("%s: object %p with OBJ_TMPFS_VREF but without vnode", __func__, object)); - KASSERT(object->un_pager.swp.writemappings == 0, - ("%s: object %p has writemappings", - __func__, object)); VI_LOCK(vp); KASSERT(vp->v_object == NULL, ("Not NULL v_object in tmpfs")); vp->v_object = object; vn_irflag_set_locked(vp, (tm->tm_pgread ? VIRF_PGREAD : 0) | VIRF_TEXT_REF); VI_UNLOCK(vp); + VNASSERT((object->flags & OBJ_TMPFS_VREF) == 0, vp, + ("leaked OBJ_TMPFS_VREF")); + if (object->un_pager.swp.writemappings > 0) { + vrefact(vp); + vlazy(vp); + vm_object_set_flag(object, OBJ_TMPFS_VREF); + } VM_OBJECT_WUNLOCK(object); break; case VDIR: