All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 22/30] btrfs: tree-checker: get fs_info from eb in check_leaf
Date: Mon, 25 Mar 2019 19:47:04 +0100	[thread overview]
Message-ID: <7e571eee20d8d8dc026bc793badbec562e30fab6.1553539114.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1553539114.git.dsterba@suse.com>

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(-)

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)
-- 
2.21.0


  parent reply	other threads:[~2019-03-25 18:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 18:46 [PATCH 00/30] Redundant argument cleanups, part 1 David Sterba
2019-03-25 18:46 ` [PATCH 01/30] btrfs: get fs_info from eb in lock_extent_buffer_for_io David Sterba
2019-03-25 18:46 ` [PATCH 02/30] btrfs: get fs_info from eb in repair_eb_io_failure David Sterba
2019-03-25 18:46 ` [PATCH 03/30] btrfs: get fs_info from eb in write_one_eb David Sterba
2019-03-25 18:46 ` [PATCH 04/30] btrfs: get fs_info from eb in leaf_data_end David Sterba
2019-03-25 18:46 ` [PATCH 05/30] btrfs: get fs_info from eb in btrfs_exclude_logged_extents David Sterba
2019-03-25 18:46 ` [PATCH 06/30] btrfs: get fs_info from eb in check_tree_block_fsid David Sterba
2019-03-25 18:46 ` [PATCH 07/30] btrfs: get fs_info from eb in tree_mod_log_eb_copy David Sterba
2019-03-25 18:46 ` [PATCH 08/30] btrfs: get fs_info from eb in clean_tree_block David Sterba
2019-03-25 18:46 ` [PATCH 09/30] btrfs: get fs_info from eb in btrfs_leaf_free_space David Sterba
2019-03-25 18:46 ` [PATCH 10/30] btrfs: get fs_info from eb in read_node_slot David Sterba
2019-03-25 18:46 ` [PATCH 11/30] btrfs: get fs_info from eb in btree_read_extent_buffer_pages David Sterba
2019-03-25 18:46 ` [PATCH 12/30] btrfs: get fs_info from eb in btrfs_verify_level_key David Sterba
2019-03-25 18:46 ` [PATCH 13/30] btrfs: tree-checker: get fs_info from eb in generic_err David Sterba
2019-03-25 18:46 ` [PATCH 14/30] btrfs: tree-checker: get fs_info from eb in file_extent_err David Sterba
2019-03-25 18:46 ` [PATCH 15/30] btrfs: tree-checker: get fs_info from eb in check_csum_item David Sterba
2019-03-25 18:46 ` [PATCH 16/30] btrfs: tree-checker: get fs_info from eb in dir_item_err David Sterba
2019-03-25 18:46 ` [PATCH 17/30] btrfs: tree-checker: get fs_info from eb in check_dir_item David Sterba
2019-03-25 18:46 ` [PATCH 18/30] btrfs: tree-checker: get fs_info from eb in block_group_err David Sterba
2019-03-25 18:46 ` [PATCH 19/30] btrfs: tree-checker: get fs_info from eb in check_block_group_item David Sterba
2019-03-25 18:47 ` [PATCH 20/30] btrfs: tree-checker: get fs_info from eb in check_extent_data_item David Sterba
2019-03-25 18:47 ` [PATCH 21/30] btrfs: tree-checker: get fs_info from eb in check_leaf_item David Sterba
2019-03-25 18:47 ` David Sterba [this message]
2019-03-25 18:47 ` [PATCH 23/30] btrfs: get fs_info from eb in btrfs_check_leaf_full David Sterba
2019-03-25 18:47 ` [PATCH 24/30] btrfs: get fs_info from eb in btrfs_check_leaf_relaxed David Sterba
2019-03-25 18:47 ` [PATCH 25/30] btrfs: get fs_info from eb in btrfs_check_node David Sterba
2019-03-25 18:47 ` [PATCH 26/30] btrfs: get fs_info from eb in should_balance_chunk David Sterba
2019-03-25 18:47 ` [PATCH 27/30] btrfs: get fs_info from eb in btrfs_check_chunk_valid David Sterba
2019-03-25 18:47 ` [PATCH 28/30] btrfs: get fs_info from eb in read_one_chunk David Sterba
2019-03-25 18:47 ` [PATCH 29/30] " David Sterba
2019-03-25 18:47 ` [PATCH 30/30] btrfs: get fs_info from eb in btrfs_check_leaf_write David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e571eee20d8d8dc026bc793badbec562e30fab6.1553539114.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.