[27/30] btrfs: get fs_info from eb in btrfs_check_chunk_valid
diff mbox series

Message ID b794e5d58c0b549703a99400160714b2a7ecc54c.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/volumes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index eaa9c38e848b..12077c32523f 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6714,10 +6714,10 @@  struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info,
 }
 
 /* Return -EIO if any error, otherwise return 0. */
-static int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info,
-				   struct extent_buffer *leaf,
+static int btrfs_check_chunk_valid(struct extent_buffer *leaf,
 				   struct btrfs_chunk *chunk, u64 logical)
 {
+	struct btrfs_fs_info *fs_info = leaf->fs_info;
 	u64 length;
 	u64 stripe_len;
 	u16 num_stripes;
@@ -6836,7 +6836,7 @@  static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
 	length = btrfs_chunk_length(leaf, chunk);
 	num_stripes = btrfs_chunk_num_stripes(leaf, chunk);
 
-	ret = btrfs_check_chunk_valid(fs_info, leaf, chunk, logical);
+	ret = btrfs_check_chunk_valid(leaf, chunk, logical);
 	if (ret)
 		return ret;