[22/30] btrfs: tree-checker: get fs_info from eb in check_leaf
diff mbox series

Message ID 7e571eee20d8d8dc026bc793badbec562e30fab6.1553539114.git.dsterba@suse.com
State New
Headers show
Series
  • Redundant argument cleanups, part 1
Related show

Commit Message

David Sterba March 25, 2019, 6:47 p.m. UTC
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/tree-checker.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Patch
diff mbox series

diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 0330e2d27afb..dd37d23ae8ba 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -474,9 +474,10 @@  static int check_leaf_item(struct extent_buffer *leaf,
 	return ret;
 }
 
-static int check_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *leaf,
-		      bool check_item_data, bool check_empty_leaf)
+static int check_leaf(struct extent_buffer *leaf, bool check_item_data,
+		      bool check_empty_leaf)
 {
+	struct btrfs_fs_info *fs_info = leaf->fs_info;
 	/* No valid key type is 0, so all key should be larger than this key */
 	struct btrfs_key prev_key = {0, 0, 0};
 	struct btrfs_key key;
@@ -643,13 +644,13 @@  static int check_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *leaf,
 int btrfs_check_leaf_full(struct btrfs_fs_info *fs_info,
 			  struct extent_buffer *leaf)
 {
-	return check_leaf(fs_info, leaf, true, true);
+	return check_leaf(leaf, true, true);
 }
 
 int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info,
 			     struct extent_buffer *leaf)
 {
-	return check_leaf(fs_info, leaf, false, true);
+	return check_leaf(leaf, false, true);
 }
 
 /*
@@ -660,7 +661,7 @@  int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info,
 int btrfs_check_leaf_write(struct btrfs_fs_info *fs_info,
 			   struct extent_buffer *leaf)
 {
-	return check_leaf(fs_info, leaf, false, false);
+	return check_leaf(leaf, false, false);
 }
 
 int btrfs_check_node(struct btrfs_fs_info *fs_info, struct extent_buffer *node)