From nobody Thu Apr 06 15:45:37 2023 X-Original-To: dev-commits-src-main@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 4Psm6n5CYyz44VYQ; Thu, 6 Apr 2023 15:45:37 +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 4Psm6n3P3wz4QTn; Thu, 6 Apr 2023 15:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680795937; 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=Z32uSBG50kMelBBM8IY1bJLh4VMfVcaSQQDHSkM/enI=; b=eb+Eb68LHrma1zMMOiTL+fm4YhFS/L9Sn/eJoHzDsRMtjidPo8/EwTrnTE50F96dw2dpop cZsoLrdiv2CAultGzd4jiohdn58+nUfZPa2X0rRTX/ir8vwh8FS9s650ZDE2mwo4eZ3ncu LWfuQfaUIGDy2fxybJdqKq1yhZE2Mko2Plo3NL2qGZnQH/E6ym5xbR8tt8QzQzXr7GX9Z8 UWfemwBne7rOGX93+CnV/WIXV27Db3Z8VsgHpj8LcTferf22MHrcXFMCn7x6nWlpgf1GtK TPke5pvTcY+PqDtgMaZBIW/1bK5TcfJs+vM+EBI4Y+5i9tXjSZYmy8U1d4Nduw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680795937; 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=Z32uSBG50kMelBBM8IY1bJLh4VMfVcaSQQDHSkM/enI=; b=j3/rUl88dtHgl/K3FERkH0Egsba7+ff47dDtZjFjxuLdDAm6tjbWabu/TZwKw4oYuwaAip sMo3KsZUOY4a/bRKIQarB7ja2EMBXf0Aefpie8tOgBlr9kE3ROWOadWyxArBl/P3wChH/L y9Ga0hCAPJDk1a+B5c55yq7eaJMFLJUVLisMx27/kwIYwQbH9/hu1BWdwXttjC07bXz2Ti 2k2rQ2QWt+q3B85i3vF+y308zfTxcD3dU+9e0r03qvqMKiFvKgJXfIlAEkKHZ+aRjSoHFF tGabQ2VL+DTjNVoe1chUdkdXVpsJnkGPp/JSKSOwxm2coU+Od9lBnsyPgLBNhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680795937; a=rsa-sha256; cv=none; b=e8O7cl+eY3qHm2t6nL69dbAUaLd1dicxYQSw7oQdTbCl+0xGQCcrKzq1+rIjIMJUlWPD1F 02ygUPIsI1QrbAYAAUx266f4ve4sSg8ivMq6aQVU1UpFB0cHly8PF4I5bZLTUPzhYkehqu GbM9jhOYCzzt+PL+P77K+z4gXiJav+lgvtqdbgIaLS+R41xu1VejWXBBrOk+t097qqeAIM /wb0BdGOhIxDRBDNyL+ybDvibrWzGD1RNlTlr8o073MfZzXAoJZtFtDwgss/8ew3hqnVrO JfSHxXuxLvZettGdiQuJTgnZZQfrP8feB8WMrjjzIRKNJk2JDGYDhBZPEN5BcQ== 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 4Psm6n1w5Zz18yn; Thu, 6 Apr 2023 15:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 336FjbGD079644; Thu, 6 Apr 2023 15:45:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 336FjbMY079643; Thu, 6 Apr 2023 15:45:37 GMT (envelope-from git) Date: Thu, 6 Apr 2023 15:45:37 GMT Message-Id: <202304061545.336FjbMY079643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e237e2ba5f4f - main - vfs: only allow doomed vnodes to return EOPNOTSUPP for fplookup vops List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e237e2ba5f4fc008eaf6e306e69fb9d98f5de27d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e237e2ba5f4fc008eaf6e306e69fb9d98f5de27d commit e237e2ba5f4fc008eaf6e306e69fb9d98f5de27d Author: Mateusz Guzik AuthorDate: 2021-11-03 21:02:35 +0000 Commit: Mateusz Guzik CommitDate: 2023-04-06 15:20:41 +0000 vfs: only allow doomed vnodes to return EOPNOTSUPP for fplookup vops This helps asserting that they are provided by filesystems indicating they do it. --- sys/kern/vfs_subr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 84b56ceec727..5c1819800d96 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -5545,10 +5545,17 @@ vop_fplookup_vexec_debugpre(void *ap __unused) } void -vop_fplookup_vexec_debugpost(void *ap __unused, int rc __unused) +vop_fplookup_vexec_debugpost(void *ap, int rc) { + struct vop_fplookup_vexec_args *a; + struct vnode *vp; + + a = ap; + vp = a->a_vp; VFS_SMR_ASSERT_ENTERED(); + if (rc == EOPNOTSUPP) + VNPASS(VN_IS_DOOMED(vp), vp); } void