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

Message ID 3076478bb8e11ae9fe17fb848fded598fe8e137b.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/disk-io.c      | 2 +-
 fs/btrfs/tree-checker.c | 3 +--
 fs/btrfs/tree-checker.h | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

Patch
diff mbox series

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 78a4f6cf866e..5373f4ad4114 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -539,7 +539,7 @@  static int csum_dirty_buffer(struct btrfs_fs_info *fs_info, struct page *page)
 	if (btrfs_header_level(eb))
 		err = btrfs_check_node(eb);
 	else
-		err = btrfs_check_leaf_write(fs_info, eb);
+		err = btrfs_check_leaf_write(eb);
 
 	if (err < 0) {
 		btrfs_err(fs_info,
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index b4f7d47f8d75..aea626a3af53 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -656,8 +656,7 @@  int btrfs_check_leaf_relaxed(struct extent_buffer *leaf)
  * Don't check if the empty leaf belongs to a tree root. Mostly for balance
  * and new tree created in current transaction.
  */
-int btrfs_check_leaf_write(struct btrfs_fs_info *fs_info,
-			   struct extent_buffer *leaf)
+int btrfs_check_leaf_write(struct extent_buffer *leaf)
 {
 	return check_leaf(leaf, false, false);
 }
diff --git a/fs/btrfs/tree-checker.h b/fs/btrfs/tree-checker.h
index fd09f2247b7c..6a3e96e26b6f 100644
--- a/fs/btrfs/tree-checker.h
+++ b/fs/btrfs/tree-checker.h
@@ -21,8 +21,7 @@  int btrfs_check_leaf_full(struct extent_buffer *leaf);
  * Will only check item pointers, not reading item data.
  */
 int btrfs_check_leaf_relaxed(struct extent_buffer *leaf);
-int btrfs_check_leaf_write(struct btrfs_fs_info *fs_info,
-			   struct extent_buffer *leaf);
+int btrfs_check_leaf_write(struct extent_buffer *leaf);
 int btrfs_check_node(struct extent_buffer *node);
 
 #endif