btrfs: get fs_info from eb in btrfs_check_leaf_full
authorDavid Sterba <dsterba@suse.com>
Wed, 20 Mar 2019 15:23:29 +0000 (16:23 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:38 +0000 (19:02 +0200)
We can read fs_info from extent buffer and can drop it from the
parameters.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/tree-checker.c
fs/btrfs/tree-checker.h

index 0b2b75a7efbdbb8bbb97a6f300b531e91e181b81..3c488fc493bd5abe870229bc3445cc43b248f1b5 100644 (file)
@@ -652,7 +652,7 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
         * that we don't try and read the other copies of this block, just
         * return -EIO.
         */
-       if (found_level == 0 && btrfs_check_leaf_full(fs_info, eb)) {
+       if (found_level == 0 && btrfs_check_leaf_full(eb)) {
                set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
                ret = -EIO;
        }
index 6828de4e976c8181d97e2f6bd6ea5403e5c9eef8..594f8a0bff61d59e4512aae198feda68ab200594 100644 (file)
@@ -963,8 +963,7 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
        return 0;
 }
 
-int btrfs_check_leaf_full(struct btrfs_fs_info *fs_info,
-                         struct extent_buffer *leaf)
+int btrfs_check_leaf_full(struct extent_buffer *leaf)
 {
        return check_leaf(leaf, true);
 }
index 4df45e8a66595521418f47bf16d87c3c0261678b..0a0c25a2e77c3c7f3cec58f426fa5be23ff17ade 100644 (file)
@@ -14,8 +14,7 @@
  * Will check not only the item pointers, but also every possible member
  * in item data.
  */
-int btrfs_check_leaf_full(struct btrfs_fs_info *fs_info,
-                         struct extent_buffer *leaf);
+int btrfs_check_leaf_full(struct extent_buffer *leaf);
 
 /*
  * Less strict leaf checker.