From 0f95ddcc0c67bfb3d2a69097e9807aabab57aeb2 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Fri, 7 Aug 2020 14:16:01 -0700 Subject: [PATCH] FreeBSD: update vaccess signature on most recent HEAD Reviewed-by: Alexander Motin Reviewed-by: Ryan Moeller Signed-off-by: Matt Macy Closes #10682 --- module/os/freebsd/zfs/zfs_vnops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/os/freebsd/zfs/zfs_vnops.c b/module/os/freebsd/zfs/zfs_vnops.c index a872351119..2a4acf2158 100644 --- a/module/os/freebsd/zfs/zfs_vnops.c +++ b/module/os/freebsd/zfs/zfs_vnops.c @@ -5284,8 +5284,13 @@ zfs_freebsd_access(struct vop_access_args *ap) if (error == 0) { accmode = ap->a_accmode & ~(VREAD|VWRITE|VEXEC|VAPPEND); if (accmode != 0) { +#if __FreeBSD_version >= 1300105 + error = vaccess(vp->v_type, zp->z_mode, zp->z_uid, + zp->z_gid, accmode, ap->a_cred); +#else error = vaccess(vp->v_type, zp->z_mode, zp->z_uid, zp->z_gid, accmode, ap->a_cred, NULL); +#endif } }