diff mbox series

[1/2] btrfs-progs: unexport csum_tree_block()

Message ID 2e7fa0afb6a4788de55bb1c4067dbfb41a4d96b8.1663053391.git.wqu@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: make corrupt-block metadata geneartion corruption work again | expand

Commit Message

Qu Wenruo Sept. 13, 2022, 7:19 a.m. UTC
The function csum_tree_block() is not really utilized by anyone, all
current callers just use csum_tree_block_size().

Furthermore there is a stale definition in common/utils.h which is using
the old "struct btrfs_root" as the first argument, while we have already
migrated to "struct btrfs_fs_info".

So just unexport csum_tree_block() and remove the stale definition.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 common/utils.h          | 2 --
 kernel-shared/disk-io.c | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/common/utils.h b/common/utils.h
index ea05fe5b21fe..f6cdb7f4dc70 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -61,8 +61,6 @@  int set_label(const char *btrfs_dev, const char *label);
 int check_arg_type(const char *input);
 int get_label_mounted(const char *mount_path, char *labelp);
 int get_label_unmounted(const char *dev, char *label);
-int csum_tree_block(struct btrfs_fs_info *root, struct extent_buffer *buf,
-		    int verify);
 int ask_user(const char *question);
 int lookup_path_rootid(int fd, u64 *rootid);
 int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount);
diff --git a/kernel-shared/disk-io.c b/kernel-shared/disk-io.c
index 2701c464cbfc..857280cc7cb7 100644
--- a/kernel-shared/disk-io.c
+++ b/kernel-shared/disk-io.c
@@ -208,8 +208,8 @@  int verify_tree_block_csum_silent(struct extent_buffer *buf, u16 csum_size,
 	return __csum_tree_block_size(buf, csum_size, 1, 1, csum_type);
 }
 
-int csum_tree_block(struct btrfs_fs_info *fs_info,
-		    struct extent_buffer *buf, int verify)
+static int csum_tree_block(struct btrfs_fs_info *fs_info,
+			   struct extent_buffer *buf, int verify)
 {
 	u16 csum_size = fs_info->csum_size;
 	u16 csum_type = fs_info->csum_type;