aboutsummaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2021-04-28 19:19:28 +0000
committerBrian Behlendorf <[email protected]>2021-05-13 15:14:01 -0700
commitd86debf5762c0d18574af67407f4c99fd9aaec3a (patch)
tree4feb8ce50d67a6124bc8ea042d9a535befadc0de /module/os
parent099ca8186b071ad6db4f8d5fab66baa1be8877b0 (diff)
FreeBSD: Use SET_ERROR to trace xattr name errors
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11997
Diffstat (limited to 'module/os')
-rw-r--r--module/os/freebsd/zfs/zfs_vnops_os.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c
index 1214f8a2b..e05d1ab07 100644
--- a/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -5250,10 +5250,10 @@ zfs_create_attrname(int attrnamespace, const char *name, char *attrname,
/* We don't allow '/' character in attribute name. */
if (strchr(name, '/') != NULL)
- return (EINVAL);
+ return (SET_ERROR(EINVAL));
/* We don't allow attribute names that start with "freebsd:" string. */
if (strncmp(name, "freebsd:", 8) == 0)
- return (EINVAL);
+ return (SET_ERROR(EINVAL));
bzero(attrname, size);
@@ -5278,11 +5278,11 @@ zfs_create_attrname(int attrnamespace, const char *name, char *attrname,
break;
case EXTATTR_NAMESPACE_EMPTY:
default:
- return (EINVAL);
+ return (SET_ERROR(EINVAL));
}
if (snprintf(attrname, size, "%s%s%s%s", prefix, namespace, suffix,
name) >= size) {
- return (ENAMETOOLONG);
+ return (SET_ERROR(ENAMETOOLONG));
}
return (0);
}