FreeBSD: Parameterize ZFS_ENTER/ZFS_VERIFY_VP with an error code

For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #13311
This commit is contained in:
Mark Johnston
2022-04-07 17:11:00 -04:00
committed by Brian Behlendorf
parent 35d81a75a8
commit e9084d0712
2 changed files with 19 additions and 15 deletions
+1 -1
View File
@@ -5451,7 +5451,7 @@ zfs_getextattr(struct vop_getextattr_args *ap)
error = ENOENT;
ZFS_ENTER(zfsvfs);
ZFS_VERIFY_ZP(zp)
ZFS_VERIFY_ZP(zp);
rw_enter(&zp->z_xattr_lock, RW_READER);
error = zfs_getextattr_impl(ap, zfs_xattr_compat);