Message ID | 15d63abd06cb64b7edc83d033e65ca00a2bae3ba.1692994620.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: ctree.[ch] cleanups | expand |
On Fri, Aug 25, 2023 at 04:19:30PM -0400, Josef Bacik wrote: > We don't need any of these includes in the ctree.h header file for the > header file itself, remove them to clean up ctree.h a little bit. While the include reduction is nice, we still don't have the includes for everything ctree.h uses, e.g. spinlock_t, mutex, pid_t, rb_tree and maybe more. It's not critical as long as it compiles and we have the includes entangled too much so incremental updates work better. The tool include-what-you-use can print the recommendeations for adding and removing includes but it can get confused by direct includes by command line -include. I did a pass for btrfs-progs, desiable for kernel too.
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 9c2e96b8711f..da9e07bf76ea 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -6,36 +6,8 @@ #ifndef BTRFS_CTREE_H #define BTRFS_CTREE_H -#include <linux/mm.h> -#include <linux/sched/signal.h> -#include <linux/highmem.h> -#include <linux/fs.h> -#include <linux/rwsem.h> -#include <linux/semaphore.h> -#include <linux/completion.h> -#include <linux/backing-dev.h> -#include <linux/wait.h> -#include <linux/slab.h> -#include <trace/events/btrfs.h> -#include <asm/unaligned.h> #include <linux/pagemap.h> -#include <linux/btrfs.h> -#include <linux/btrfs_tree.h> -#include <linux/workqueue.h> -#include <linux/security.h> -#include <linux/sizes.h> -#include <linux/dynamic_debug.h> -#include <linux/refcount.h> -#include <linux/crc32c.h> -#include <linux/iomap.h> -#include <linux/fscrypt.h> -#include "extent-io-tree.h" -#include "extent_io.h" -#include "extent_map.h" -#include "async-thread.h" -#include "block-rsv.h" #include "locking.h" -#include "misc.h" #include "fs.h" struct btrfs_trans_handle;
We don't need any of these includes in the ctree.h header file for the header file itself, remove them to clean up ctree.h a little bit. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- fs/btrfs/ctree.h | 28 ---------------------------- 1 file changed, 28 deletions(-)