Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2023 15:45:37 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e237e2ba5f4f - main - vfs: only allow doomed vnodes to return EOPNOTSUPP for fplookup vops
Message-ID:  <202304061545.336FjbMY079643@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=e237e2ba5f4fc008eaf6e306e69fb9d98f5de27d

commit e237e2ba5f4fc008eaf6e306e69fb9d98f5de27d
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-11-03 21:02:35 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304061545.336FjbMY079643>