From 5156862960fad12d7f9c8b57c01419c2875d7566 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 24 Feb 2021 12:51:10 -0500 Subject: [PATCH] Wrap bare EINVAL returns with SET_ERROR Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #11636 --- module/zfs/zfs_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 4e64563388..db02f2ea09 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -3986,7 +3986,7 @@ zfs_ioc_pool_initialize(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) fnvlist_free(vdev_errlist); spa_close(spa, FTAG); - return (total_errors > 0 ? EINVAL : 0); + return (total_errors > 0 ? SET_ERROR(EINVAL) : 0); } /* @@ -4071,7 +4071,7 @@ zfs_ioc_pool_trim(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) fnvlist_free(vdev_errlist); spa_close(spa, FTAG); - return (total_errors > 0 ? EINVAL : 0); + return (total_errors > 0 ? SET_ERROR(EINVAL) : 0); } /*