From cfdaad5e5f425b0a42ff1df3893f137b90099f44 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 20 Mar 2019 16:24:18 +0100 Subject: [PATCH] btrfs: get fs_info from eb in btrfs_check_leaf_relaxed We can read fs_info from extent buffer and can drop it from the parameters. Signed-off-by: David Sterba --- fs/btrfs/disk-io.c | 2 +- fs/btrfs/tree-checker.c | 3 +-- fs/btrfs/tree-checker.h | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 3c488fc493bd..516812801081 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -4101,7 +4101,7 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf) * So here we should only check item pointers, not item data. */ if (btrfs_header_level(buf) == 0 && - btrfs_check_leaf_relaxed(fs_info, buf)) { + btrfs_check_leaf_relaxed(buf)) { btrfs_print_leaf(buf); ASSERT(0); } diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index 594f8a0bff61..785318ead9af 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -968,8 +968,7 @@ int btrfs_check_leaf_full(struct extent_buffer *leaf) return check_leaf(leaf, true); } -int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info, - struct extent_buffer *leaf) +int btrfs_check_leaf_relaxed(struct extent_buffer *leaf) { return check_leaf(leaf, false); } diff --git a/fs/btrfs/tree-checker.h b/fs/btrfs/tree-checker.h index 0a0c25a2e77c..57c121ab8898 100644 --- a/fs/btrfs/tree-checker.h +++ b/fs/btrfs/tree-checker.h @@ -20,8 +20,7 @@ int btrfs_check_leaf_full(struct extent_buffer *leaf); * Less strict leaf checker. * Will only check item pointers, not reading item data. */ -int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info, - struct extent_buffer *leaf); +int btrfs_check_leaf_relaxed(struct extent_buffer *leaf); int btrfs_check_node(struct btrfs_fs_info *fs_info, struct extent_buffer *node); int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info,