diff --git a/module/os/freebsd/zfs/zfs_file_os.c b/module/os/freebsd/zfs/zfs_file_os.c index a3d67aaa11..fd86a75416 100644 --- a/module/os/freebsd/zfs/zfs_file_os.c +++ b/module/os/freebsd/zfs/zfs_file_os.c @@ -207,7 +207,11 @@ zfs_file_getattr(zfs_file_t *fp, zfs_file_attr_t *zfattr) td = curthread; +#if __FreeBSD_version < 1400037 rc = fo_stat(fp, &sb, td->td_ucred, td); +#else + rc = fo_stat(fp, &sb, td->td_ucred); +#endif if (rc) return (SET_ERROR(rc)); zfattr->zfa_size = sb.st_size; diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c index be82530448..7aeb6ca3f8 100644 --- a/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/module/os/freebsd/zfs/zfs_vnops_os.c @@ -1338,7 +1338,9 @@ zfs_lookup_internal(znode_t *dzp, const char *name, vnode_t **vpp, cnp->cn_flags = ISLASTCN | SAVENAME; cnp->cn_lkflags = LK_EXCLUSIVE | LK_RETRY; cnp->cn_cred = kcred; +#if __FreeBSD_version < 1400037 cnp->cn_thread = curthread; +#endif if (zfsvfs->z_use_namecache && !zfsvfs->z_replay) { struct vop_lookup_args a; @@ -4593,7 +4595,7 @@ zfs_freebsd_lookup(struct vop_lookup_args *ap, boolean_t cached) strlcpy(nm, cnp->cn_nameptr, MIN(cnp->cn_namelen + 1, sizeof (nm))); return (zfs_lookup(ap->a_dvp, nm, ap->a_vpp, cnp, cnp->cn_nameiop, - cnp->cn_cred, cnp->cn_thread, 0, cached)); + cnp->cn_cred, curthread, 0, cached)); } static int