summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2021-04-28 19:19:28 +0000
committerBrian Behlendorf <[email protected]>2021-05-27 22:12:26 -0700
commitc2c02e490fb05ae509b2b702c8926a9de0f1dc2a (patch)
tree85980e6659629b2089e6f12f63c3e2002c036405 /module
parent793dffb04ee0bf8d84cad5b62d4600e80f2f2719 (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')
-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 011ac9334..6caca2992 100644
--- a/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -5264,10 +5264,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);
@@ -5292,11 +5292,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);
}