From b2dc5d0037a4f14d5ecd21baf5845e24ad4aa390 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 30 Sep 2021 20:24:25 +0200 Subject: [PATCH] btrfs-progs: remove c++ protection from internal headers We don't need the c++ name mangling protection in headers that are not part of libbtrfs. Signed-off-by: David Sterba --- common/rbtree-utils.h | 8 -------- kernel-lib/rbtree_augmented.h | 8 -------- 2 files changed, 16 deletions(-) diff --git a/common/rbtree-utils.h b/common/rbtree-utils.h index 767d4ef4..a6f51def 100644 --- a/common/rbtree-utils.h +++ b/common/rbtree-utils.h @@ -21,10 +21,6 @@ #include "kernel-lib/rbtree.h" -#ifdef __cplusplus -extern "C" { -#endif - /* The common insert/search/free functions */ typedef int (*rb_compare_nodes)(struct rb_node *node1, struct rb_node *node2); typedef int (*rb_compare_keys)(struct rb_node *node, void *key); @@ -46,8 +42,4 @@ static void free_##name##_tree(struct rb_root *root) \ rb_free_nodes(root, free_func); \ } -#ifdef __cplusplus -} -#endif - #endif diff --git a/kernel-lib/rbtree_augmented.h b/kernel-lib/rbtree_augmented.h index 091d3bfe..1ea17a17 100644 --- a/kernel-lib/rbtree_augmented.h +++ b/kernel-lib/rbtree_augmented.h @@ -26,10 +26,6 @@ #include "kernel-lib/rbtree.h" -#ifdef __cplusplus -extern "C" { -#endif - /* * Please note - only struct rb_augment_callbacks and the prototypes for * rb_insert_augmented() and rb_erase_augmented() are intended to be public. @@ -242,8 +238,4 @@ rb_erase_augmented(struct rb_node *node, struct rb_root *root, __rb_erase_color(rebalance, root, augment->rotate); } -#ifdef __cplusplus -} -#endif - #endif /* _LINUX_RBTREE_AUGMENTED_H */