From 41e2b3de13521230e3447e737638e73830ddfa3d Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 15 Oct 2020 05:08:20 +0000 Subject: FreeBSD: add missing fplookup_vexec handler to special vop vectors Otherwise lookup can fail with EOPNOTSUPP or panic. Reviewed-by: Ryan Moeller Reviewed-by: Matt Macy Signed-off-by: Mateusz Guzik Closes #11066 --- module/os/freebsd/zfs/zfs_ctldir.c | 9 +++++++++ module/os/freebsd/zfs/zfs_vnops.c | 3 +++ 2 files changed, 12 insertions(+) (limited to 'module/os') diff --git a/module/os/freebsd/zfs/zfs_ctldir.c b/module/os/freebsd/zfs/zfs_ctldir.c index 393d61e52..587c648a0 100644 --- a/module/os/freebsd/zfs/zfs_ctldir.c +++ b/module/os/freebsd/zfs/zfs_ctldir.c @@ -796,6 +796,9 @@ zfsctl_common_getacl(struct vop_getacl_args *ap) static struct vop_vector zfsctl_ops_root = { .vop_default = &default_vnodeops, +#if __FreeBSD_version >= 1300121 + .vop_fplookup_vexec = VOP_EAGAIN, +#endif .vop_open = zfsctl_common_open, .vop_close = zfsctl_common_close, .vop_ioctl = VOP_EINVAL, @@ -1113,6 +1116,9 @@ zfsctl_snapdir_getattr(struct vop_getattr_args *ap) static struct vop_vector zfsctl_ops_snapdir = { .vop_default = &default_vnodeops, +#if __FreeBSD_version >= 1300121 + .vop_fplookup_vexec = VOP_EAGAIN, +#endif .vop_open = zfsctl_common_open, .vop_close = zfsctl_common_close, .vop_getattr = zfsctl_snapdir_getattr, @@ -1214,6 +1220,9 @@ zfsctl_snapshot_vptocnp(struct vop_vptocnp_args *ap) */ static struct vop_vector zfsctl_ops_snapshot = { .vop_default = NULL, /* ensure very restricted access */ +#if __FreeBSD_version >= 1300121 + .vop_fplookup_vexec = VOP_EAGAIN, +#endif .vop_inactive = zfsctl_snapshot_inactive, #if __FreeBSD_version >= 1300045 .vop_need_inactive = vop_stdneed_inactive, diff --git a/module/os/freebsd/zfs/zfs_vnops.c b/module/os/freebsd/zfs/zfs_vnops.c index c74e2e8ff..18c71511f 100644 --- a/module/os/freebsd/zfs/zfs_vnops.c +++ b/module/os/freebsd/zfs/zfs_vnops.c @@ -6641,6 +6641,9 @@ VFS_VOP_VECTOR_REGISTER(zfs_fifoops); */ struct vop_vector zfs_shareops = { .vop_default = &default_vnodeops, +#if __FreeBSD_version >= 1300121 + .vop_fplookup_vexec = VOP_EAGAIN, +#endif .vop_access = zfs_freebsd_access, .vop_inactive = zfs_freebsd_inactive, .vop_reclaim = zfs_freebsd_reclaim, -- cgit v1.2.3