FreeBSD: Use NDFREE_PNBUF if available
NDF_ONLY_PNBUF has been removed from FreeBSD in favor of NDFREE_PNBUF. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org> Closes #13277
This commit is contained in:
parent
5a9994f5ae
commit
a5a28723bd
|
@ -97,6 +97,10 @@
|
||||||
|
|
||||||
VFS_SMR_DECLARE;
|
VFS_SMR_DECLARE;
|
||||||
|
|
||||||
|
#if __FreeBSD_version < 1300103
|
||||||
|
#define NDFREE_PNBUF(ndp) NDFREE((ndp), NDF_ONLY_PNBUF)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __FreeBSD_version >= 1300047
|
#if __FreeBSD_version >= 1300047
|
||||||
#define vm_page_wire_lock(pp)
|
#define vm_page_wire_lock(pp)
|
||||||
#define vm_page_wire_unlock(pp)
|
#define vm_page_wire_unlock(pp)
|
||||||
|
@ -5357,7 +5361,7 @@ zfs_getextattr_dir(struct vop_getextattr_args *ap, const char *attrname)
|
||||||
#endif
|
#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_PNBUF(&nd);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
|
@ -5475,12 +5479,12 @@ zfs_deleteextattr_dir(struct vop_deleteextattr_args *ap, const char *attrname)
|
||||||
error = namei(&nd);
|
error = namei(&nd);
|
||||||
vp = nd.ni_vp;
|
vp = nd.ni_vp;
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
NDFREE_PNBUF(&nd);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd);
|
error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd);
|
||||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
NDFREE_PNBUF(&nd);
|
||||||
|
|
||||||
vput(nd.ni_dvp);
|
vput(nd.ni_dvp);
|
||||||
if (vp == nd.ni_dvp)
|
if (vp == nd.ni_dvp)
|
||||||
|
@ -5605,7 +5609,7 @@ zfs_setextattr_dir(struct vop_setextattr_args *ap, const char *attrname)
|
||||||
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;
|
||||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
NDFREE_PNBUF(&nd);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
|
@ -5760,7 +5764,7 @@ zfs_listextattr_dir(struct vop_listextattr_args *ap, const char *attrprefix)
|
||||||
#endif
|
#endif
|
||||||
error = namei(&nd);
|
error = namei(&nd);
|
||||||
vp = nd.ni_vp;
|
vp = nd.ni_vp;
|
||||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
NDFREE_PNBUF(&nd);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue