Skip to content

Commit

Permalink
Make sure avl_tree.avl_pad is not in kernel module
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Youzhong Yang authored and youzhongyang committed Jul 17, 2024
1 parent 41902c8 commit 1176fd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/sys/avl_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
*/

#include <sys/types.h>
#include <sys/sysmacros.h>

#ifdef __cplusplus
extern "C" {
Expand Down
3 changes: 1 addition & 2 deletions include/sys/spa.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@
#ifndef _SYS_SPA_H
#define _SYS_SPA_H

#include <sys/avl.h>
#include <sys/zfs_context.h>
#include <sys/avl.h>
#include <sys/kstat.h>
#include <sys/nvpair.h>
#include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/fs/zfs.h>
#include <sys/spa_checksum.h>
Expand Down

0 comments on commit 1176fd4

Please sign in to comment.