From 2e6af52b2e2bbab1d1988bd52290586d3bd91623 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Thu, 18 Jun 2020 16:45:36 -0400 Subject: [PATCH] Match new vfs_checkexp KPI in FreeBSD head KPI changed in FreeBSD, update accordingly. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #10475 --- module/os/freebsd/zfs/zfs_vfsops.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/os/freebsd/zfs/zfs_vfsops.c b/module/os/freebsd/zfs/zfs_vfsops.c index 5bd6bdfae..4edf1a0e7 100644 --- a/module/os/freebsd/zfs/zfs_vfsops.c +++ b/module/os/freebsd/zfs/zfs_vfsops.c @@ -108,8 +108,13 @@ static int zfs_root(vfs_t *vfsp, int flags, vnode_t **vpp); static int zfs_statfs(vfs_t *vfsp, struct statfs *statp); static int zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp); static int zfs_sync(vfs_t *vfsp, int waitfor); +#if __FreeBSD_version >= 1300098 +static int zfs_checkexp(vfs_t *vfsp, struct sockaddr *nam, uint64_t *extflagsp, + struct ucred **credanonp, int *numsecflavors, int *secflavors); +#else static int zfs_checkexp(vfs_t *vfsp, struct sockaddr *nam, int *extflagsp, struct ucred **credanonp, int *numsecflavors, int **secflavors); +#endif static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp); static void zfs_freevfs(vfs_t *vfsp); @@ -1909,9 +1914,14 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp) return (err); } +#if __FreeBSD_version >= 1300098 +static int zfs_checkexp(vfs_t *vfsp, struct sockaddr *nam, uint64_t *extflagsp, + struct ucred **credanonp, int *numsecflavors, int *secflavors); +#else static int zfs_checkexp(vfs_t *vfsp, struct sockaddr *nam, int *extflagsp, struct ucred **credanonp, int *numsecflavors, int **secflavors) +#endif { zfsvfs_t *zfsvfs = vfsp->vfs_data;