From 03735ff372f2ee0d5935c612e71f20a5806454cc Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 6 Aug 2024 15:02:18 +0200 Subject: [PATCH] libbtrfs: reduce rbtree includes and ship only rbtree_types.h None of the public API uses the rb-tree code besides definitions, so change the includes in ctree.h and drop rbtree.h, this is used only by internal implementation in send-utils.c. We could remove it in the future but last time it was not possible due to 3rd party code depending on it. Removed in 83ab92512e79a5 ("libbtrfs: remove the support for fs without uuid tree") and reverted again in f9b0da8e783601 ("Revert "libbtrfs: remove the support for fs without uuid tree"") Signed-off-by: David Sterba --- Makefile | 2 +- libbtrfs/ctree.h | 4 ++-- tests/library-test.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e6b3e5e6..2f8d2fa0 100644 --- a/Makefile +++ b/Makefile @@ -269,7 +269,7 @@ libbtrfs_objects = \ libbtrfs/send-utils.o \ libbtrfs/crc32c.o -libbtrfs_headers = libbtrfs/send-stream.h libbtrfs/send-utils.h libbtrfs/send.h kernel-lib/rbtree.h \ +libbtrfs_headers = libbtrfs/send-stream.h libbtrfs/send-utils.h libbtrfs/send.h \ kernel-lib/rbtree_types.h libbtrfs/kerncompat.h \ libbtrfs/ioctl.h libbtrfs/ctree.h libbtrfs/version.h libbtrfs_version = $(LIBBTRFS_MAJOR).$(LIBBTRFS_MINOR).$(LIBBTRFS_PATCHLEVEL) diff --git a/libbtrfs/ctree.h b/libbtrfs/ctree.h index 9de771f7..0fb25d58 100644 --- a/libbtrfs/ctree.h +++ b/libbtrfs/ctree.h @@ -23,11 +23,11 @@ #if BTRFS_FLAT_INCLUDES #include "libbtrfs/kerncompat.h" -#include "kernel-lib/rbtree.h" +#include "kernel-lib/rbtree_types.h" #include "libbtrfs/ioctl.h" #else #include -#include +#include #include #endif /* BTRFS_FLAT_INCLUDES */ diff --git a/tests/library-test.c b/tests/library-test.c index 11e991eb..27783f1a 100644 --- a/tests/library-test.c +++ b/tests/library-test.c @@ -20,7 +20,7 @@ #include "libbtrfs/kerncompat.h" #include "libbtrfs/version.h" #include "libbtrfs/ioctl.h" -#include "kernel-lib/rbtree.h" +#include "kernel-lib/rbtree_types.h" #include "kernel-shared/ctree.h" #include "kernel-shared/send.h" #include "common/send-stream.h" @@ -32,7 +32,7 @@ */ #include "btrfs/kerncompat.h" #include "btrfs/version.h" -#include "btrfs/rbtree.h" +#include "btrfs/rbtree_types.h" #include "btrfs/ctree.h" #include "btrfs/ioctl.h" #include "btrfs/send.h"