From f11b09dec3d33ba11bc3bf7644bdde558d08ad76 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Thu, 7 Jan 2021 10:41:27 -0800 Subject: [PATCH] FreeBSD: minor_t needs to be signed so that -1 is recognized as such zfsdev_close sets zs_minor to -1 to avoid duplicate calls to destroy. This doesn't mix well with the current u_int used. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Matt Macy Closes #11437 --- include/os/freebsd/spl/sys/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/os/freebsd/spl/sys/types.h b/include/os/freebsd/spl/sys/types.h index 3f89536288..ecb91fd1bb 100644 --- a/include/os/freebsd/spl/sys/types.h +++ b/include/os/freebsd/spl/sys/types.h @@ -64,7 +64,7 @@ typedef u_int uint_t; typedef u_char uchar_t; typedef u_short ushort_t; typedef u_long ulong_t; -typedef u_int minor_t; +typedef int minor_t; /* END CSTYLED */ #ifndef _OFF64_T_DECLARED #define _OFF64_T_DECLARED