Skip to content

Commit abad680

Browse files
committed
btrfs-progs: clean up includes
Remove unused includes, add ones that are missing. Signed-off-by: David Sterba <[email protected]>
1 parent 5af36f0 commit abad680

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+44
-84
lines changed

check/mode-original.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
#ifndef __BTRFS_CHECK_MODE_ORIGINAL_H__
2222
#define __BTRFS_CHECK_MODE_ORIGINAL_H__
2323

24+
#include "kerncompat.h"
25+
#include "kernel-lib/rbtree.h"
26+
#include "kernel-lib/list.h"
27+
#include "kernel-shared/uapi/btrfs_tree.h"
28+
#include "common/extent-cache.h"
2429
#include "common/rbtree-utils.h"
2530

2631
struct extent_backref {

cmds/device.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <dirent.h>
2727
#include <stdbool.h>
2828
#include "kernel-shared/zoned.h"
29-
#include "kernel-shared/volumes.h"
3029
#include "common/string-table.h"
3130
#include "common/utils.h"
3231
#include "common/help.h"

cmds/filesystem-usage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define __CMDS_FI_USAGE_H__
2121

2222
#include "kerncompat.h"
23-
#include "kernel-shared/volumes.h"
23+
#include "kernel-shared/uapi/btrfs.h"
2424
#include "common/array.h"
2525

2626
struct device_info {

cmds/props.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#ifndef __BTRFS_PROPS_H__
1818
#define __BTRFS_PROPS_H__
1919

20+
#include <stdbool.h>
21+
2022
enum prop_object_type {
2123
prop_object_dev = (1U << 0),
2224
prop_object_root = (1U << 1),

cmds/reflink.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include <unistd.h>
2424
#include "kernel-lib/list.h"
2525
#include "common/messages.h"
26-
#include "common/open-utils.h"
27-
#include "common/parse-utils.h"
2826
#include "common/string-utils.h"
2927
#include "common/help.h"
3028
#include "cmds/commands.h"

cmds/scrub.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@
5050
#include "common/open-utils.h"
5151
#include "common/units.h"
5252
#include "common/device-utils.h"
53-
#include "common/parse-utils.h"
5453
#include "common/sysfs-utils.h"
5554
#include "common/string-table.h"
5655
#include "common/string-utils.h"
57-
#include "common/parse-utils.h"
5856
#include "common/help.h"
5957
#include "cmds/commands.h"
6058

common/clear-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
#include "kernel-shared/file-item.h"
3232
#include "common/internal.h"
3333
#include "common/messages.h"
34+
#include "common/clear-cache.h"
3435
#include "check/repair.h"
3536
#include "check/mode-common.h"
36-
#include "common/clear-cache.h"
3737

3838
/*
3939
* Number of free space cache inodes to delete in one transaction.

common/device-scan.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include "kerncompat.h"
2121
#include <dirent.h>
22-
#include "kernel-lib/bitops.h"
2322
#include "kernel-shared/uapi/btrfs.h"
2423

2524
enum {

common/device-utils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "kerncompat.h"
2121
#include <stdbool.h>
2222
#include <unistd.h>
23-
#include "kernel-lib/bitops.h"
2423

2524
struct btrfs_ioctl_dev_info_args;
2625
struct stat;

common/extent-tree-utils.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@
1616

1717
#include "kerncompat.h"
1818
#include <stddef.h>
19-
#include "kernel-shared/accessors.h"
2019
#include "kernel-shared/uapi/btrfs_tree.h"
2120
#include "kernel-shared/ctree.h"
22-
#include "kernel-shared/disk-io.h"
23-
#include "kernel-shared/free-space-tree.h"
24-
#include "kernel-shared/transaction.h"
2521
#include "common/extent-tree-utils.h"
2622

2723
/*

0 commit comments

Comments
 (0)