mirror of https://github.com/openzfs/zfs.git
FreeBSD: Catch up with recent VFS changes
cn_thread is always curthread. https://cgit.freebsd.org/src/commit?id=b4a58fbf640409a1e507d9f7b411c83a3f83a2f3 https://cgit.freebsd.org/src/commit?id=2b68eb8e1dbbdaf6a0df1c83b26f5403ca52d4c3 Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Alan Somers <asomers@gmail.com> Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org> Closes #12668
This commit is contained in:
parent
7cc5cb8083
commit
14b69c0929
|
@ -207,7 +207,11 @@ zfs_file_getattr(zfs_file_t *fp, zfs_file_attr_t *zfattr)
|
||||||
|
|
||||||
td = curthread;
|
td = curthread;
|
||||||
|
|
||||||
|
#if __FreeBSD_version < 1400037
|
||||||
rc = fo_stat(fp, &sb, td->td_ucred, td);
|
rc = fo_stat(fp, &sb, td->td_ucred, td);
|
||||||
|
#else
|
||||||
|
rc = fo_stat(fp, &sb, td->td_ucred);
|
||||||
|
#endif
|
||||||
if (rc)
|
if (rc)
|
||||||
return (SET_ERROR(rc));
|
return (SET_ERROR(rc));
|
||||||
zfattr->zfa_size = sb.st_size;
|
zfattr->zfa_size = sb.st_size;
|
||||||
|
|
|
@ -1324,7 +1324,9 @@ zfs_lookup_internal(znode_t *dzp, const char *name, vnode_t **vpp,
|
||||||
cnp->cn_flags = ISLASTCN | SAVENAME;
|
cnp->cn_flags = ISLASTCN | SAVENAME;
|
||||||
cnp->cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
|
cnp->cn_lkflags = LK_EXCLUSIVE | LK_RETRY;
|
||||||
cnp->cn_cred = kcred;
|
cnp->cn_cred = kcred;
|
||||||
|
#if __FreeBSD_version < 1400037
|
||||||
cnp->cn_thread = curthread;
|
cnp->cn_thread = curthread;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (zfsvfs->z_use_namecache && !zfsvfs->z_replay) {
|
if (zfsvfs->z_use_namecache && !zfsvfs->z_replay) {
|
||||||
struct vop_lookup_args a;
|
struct vop_lookup_args a;
|
||||||
|
@ -4579,7 +4581,7 @@ zfs_freebsd_lookup(struct vop_lookup_args *ap, boolean_t cached)
|
||||||
strlcpy(nm, cnp->cn_nameptr, MIN(cnp->cn_namelen + 1, sizeof (nm)));
|
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,
|
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
|
static int
|
||||||
|
|
Loading…
Reference in New Issue