summaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-03-20 18:40:48 +0300
committerDavid Sterba <dsterba@suse.com>2019-04-29 20:02:39 +0300
commitddaf1d5aef2c34f0cf5b0d71a48f9d88c5a0e2dc (patch)
treea4d9170bf4d5c47d6da1be05ab8b78b32a8e08ca /fs/btrfs/tree-checker.c
parent6ec0896c4c810da6abf2130f13cbbe38a8955697 (diff)
downloadlinux-ddaf1d5aef2c34f0cf5b0d71a48f9d88c5a0e2dc.tar.xz
btrfs: get fs_info from eb in btrfs_check_chunk_valid
We can read fs_info from extent buffer and can drop it from the parameters. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-checker.c')
-rw-r--r--fs/btrfs/tree-checker.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 3f047758ec24..5c988b57b90e 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -498,10 +498,10 @@ static void chunk_err(const struct extent_buffer *leaf,
* Return -EUCLEAN if anything is corrupted.
* Return 0 if everything is OK.
*/
-int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info,
- struct extent_buffer *leaf,
+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;
@@ -793,8 +793,7 @@ static int check_leaf_item(struct extent_buffer *leaf,
break;
case BTRFS_CHUNK_ITEM_KEY:
chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk);
- ret = btrfs_check_chunk_valid(leaf->fs_info, leaf, chunk,
- key->offset);
+ ret = btrfs_check_chunk_valid(leaf, chunk, key->offset);
break;
case BTRFS_DEV_ITEM_KEY:
ret = check_dev_item(leaf, key, slot);