FreeBSD: Catch up with more VFS changes

Unused thread argument was removed from NDINIT*

https://cgit.freebsd.org/src/commit?id=7e1d3eefd410ca0fbae5a217422821244c3eeee4

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #12828
This commit is contained in:
Ryan Moeller 2021-12-09 18:04:56 +00:00 committed by Tony Hutter
parent 19337332cc
commit effe984148
1 changed files with 18 additions and 0 deletions

View File

@ -5352,8 +5352,12 @@ zfs_getextattr_dir(struct vop_getextattr_args *ap, const char *attrname)
return (error); return (error);
flags = FREAD; flags = FREAD;
#if __FreeBSD_version < 1400043
NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname,
xvp, td); xvp, td);
#else
NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp);
#endif
error = vn_open_cred(&nd, &flags, 0, VN_OPEN_INVFS, ap->a_cred, NULL); error = vn_open_cred(&nd, &flags, 0, VN_OPEN_INVFS, ap->a_cred, NULL);
vp = nd.ni_vp; vp = nd.ni_vp;
NDFREE(&nd, NDF_ONLY_PNBUF); NDFREE(&nd, NDF_ONLY_PNBUF);
@ -5464,8 +5468,13 @@ zfs_deleteextattr_dir(struct vop_deleteextattr_args *ap, const char *attrname)
if (error != 0) if (error != 0)
return (error); return (error);
#if __FreeBSD_version < 1400043
NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF, NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF,
UIO_SYSSPACE, attrname, xvp, ap->a_td); UIO_SYSSPACE, attrname, xvp, ap->a_td);
#else
NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF,
UIO_SYSSPACE, attrname, xvp);
#endif
error = namei(&nd); error = namei(&nd);
vp = nd.ni_vp; vp = nd.ni_vp;
if (error != 0) { if (error != 0) {
@ -5591,7 +5600,11 @@ zfs_setextattr_dir(struct vop_setextattr_args *ap, const char *attrname)
return (error); return (error);
flags = FFLAGS(O_WRONLY | O_CREAT); flags = FFLAGS(O_WRONLY | O_CREAT);
#if __FreeBSD_version < 1400043
NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp, td); NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp, td);
#else
NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp);
#endif
error = vn_open_cred(&nd, &flags, 0600, VN_OPEN_INVFS, ap->a_cred, error = vn_open_cred(&nd, &flags, 0600, VN_OPEN_INVFS, ap->a_cred,
NULL); NULL);
vp = nd.ni_vp; vp = nd.ni_vp;
@ -5741,8 +5754,13 @@ zfs_listextattr_dir(struct vop_listextattr_args *ap, const char *attrprefix)
return (error); return (error);
} }
#if __FreeBSD_version < 1400043
NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED, NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED,
UIO_SYSSPACE, ".", xvp, td); UIO_SYSSPACE, ".", xvp, td);
#else
NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED,
UIO_SYSSPACE, ".", xvp);
#endif
error = namei(&nd); error = namei(&nd);
vp = nd.ni_vp; vp = nd.ni_vp;
NDFREE(&nd, NDF_ONLY_PNBUF); NDFREE(&nd, NDF_ONLY_PNBUF);