Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c @@ -137,7 +137,7 @@ *minorp = (minor_t)(uintptr_t)data; curthread->td_fpop = tmpfp; if (error != 0) - return (error); + return (SET_ERROR(EBADF)); return (zfs_onexit_minor_to_state(*minorp, &zo)); }