From ab6d9bd89a87ed65c83db241fb476e81d88e166f Mon Sep 17 00:00:00 2001 From: youzhongyang Date: Wed, 17 Jul 2024 16:54:11 -0400 Subject: [PATCH] Make sure avl_tree.avl_pad is not in kernel module (#16280) The commit b192a2c (Remove avl_size field from struct avl_tree) uses a def _KERNEL to decide to include avl_pad or not, but this _KERNEL is defined in sys/sysmacros.h. If avl.h and sysmacros.h are not included in the right order, it can cause a headache when working on a zfs related kernel module. Add sysmacros.h in avl_impl.h to fix. sysmacros.h is also removed from spa.h as it's reduntant. Signed-off-by: Youzhong Yang Co-authored-by: Youzhong Yang Reviewed-by: Rob Norris Reviewed-by: Alexander Motin Reviewed-by: Tino Reichardt Reviewed-by: Tony Hutter --- include/sys/avl_impl.h | 1 + include/sys/spa.h | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/avl_impl.h b/include/sys/avl_impl.h index 85277b42b4..b2b4eb4bce 100644 --- a/include/sys/avl_impl.h +++ b/include/sys/avl_impl.h @@ -34,6 +34,7 @@ */ #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/sys/spa.h b/include/sys/spa.h index 3073c4d1b9..f50cb5e04e 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -35,11 +35,10 @@ #ifndef _SYS_SPA_H #define _SYS_SPA_H -#include #include +#include #include #include -#include #include #include #include