Commit 39e57f49 authored by David Sterba's avatar David Sterba

btrfs: tree-checker: get fs_info from eb in check_inode_item

We can read fs_info from extent buffer and can drop it from the
parameters.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 412a2312
...@@ -680,10 +680,10 @@ static int check_dev_item(struct extent_buffer *leaf, ...@@ -680,10 +680,10 @@ static int check_dev_item(struct extent_buffer *leaf,
#define inode_item_err(fs_info, eb, slot, fmt, ...) \ #define inode_item_err(fs_info, eb, slot, fmt, ...) \
dir_item_err(eb, slot, fmt, __VA_ARGS__) dir_item_err(eb, slot, fmt, __VA_ARGS__)
static int check_inode_item(struct btrfs_fs_info *fs_info, static int check_inode_item(struct extent_buffer *leaf,
struct extent_buffer *leaf,
struct btrfs_key *key, int slot) struct btrfs_key *key, int slot)
{ {
struct btrfs_fs_info *fs_info = leaf->fs_info;
struct btrfs_inode_item *iitem; struct btrfs_inode_item *iitem;
u64 super_gen = btrfs_super_generation(fs_info->super_copy); u64 super_gen = btrfs_super_generation(fs_info->super_copy);
u32 valid_mask = (S_IFMT | S_ISUID | S_ISGID | S_ISVTX | 0777); u32 valid_mask = (S_IFMT | S_ISUID | S_ISGID | S_ISVTX | 0777);
...@@ -800,7 +800,7 @@ static int check_leaf_item(struct extent_buffer *leaf, ...@@ -800,7 +800,7 @@ static int check_leaf_item(struct extent_buffer *leaf,
ret = check_dev_item(leaf, key, slot); ret = check_dev_item(leaf, key, slot);
break; break;
case BTRFS_INODE_ITEM_KEY: case BTRFS_INODE_ITEM_KEY:
ret = check_inode_item(leaf->fs_info, leaf, key, slot); ret = check_inode_item(leaf, key, slot);
break; break;
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment