diff options
author | mav <mav@FreeBSD.org> | 2016-04-04 09:48:58 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-04-04 09:48:58 +0000 |
commit | 2eb569b3860d22a7311a972388eda6d51981961f (patch) | |
tree | edfbf0abdee474084638694a2e8e18381ae8facc /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | |
parent | be0c6e50d78c8a594679933cbaf9793362406158 (diff) | |
download | FreeBSD-src-2eb569b3860d22a7311a972388eda6d51981961f.zip FreeBSD-src-2eb569b3860d22a7311a972388eda6d51981961f.tar.gz |
MFC r297337: Pass through error code from make_dev_p().
ENAMETOOLONG is much more informative in logs then ENXIO.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c index 57ca0f8..df8a9a4 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -686,13 +686,14 @@ zvol_create_minor(const char *name) bioq_init(&zv->zv_queue); mtx_init(&zv->zv_queue_mtx, "zvol", NULL, MTX_DEF); } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) { - if (make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, + error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &dev, &zvol_cdevsw, NULL, UID_ROOT, GID_OPERATOR, - 0640, "%s/%s", ZVOL_DRIVER, name) != 0) { + 0640, "%s/%s", ZVOL_DRIVER, name); + if (error != 0) { kmem_free(zv, sizeof(*zv)); dmu_objset_disown(os, FTAG); mutex_exit(&zfsdev_state_lock); - return (SET_ERROR(ENXIO)); + return (error); } zv->zv_dev = dev; dev->si_iosize_max = MAXPHYS; |