summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/tree-checker.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index c5dd7adea306..8cae930a666d 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -771,8 +771,7 @@ static int check_inode_item(struct btrfs_fs_info *fs_info,
771/* 771/*
772 * Common point to switch the item-specific validation. 772 * Common point to switch the item-specific validation.
773 */ 773 */
774static int check_leaf_item(struct btrfs_fs_info *fs_info, 774static int check_leaf_item(struct extent_buffer *leaf,
775 struct extent_buffer *leaf,
776 struct btrfs_key *key, int slot) 775 struct btrfs_key *key, int slot)
777{ 776{
778 int ret = 0; 777 int ret = 0;
@@ -795,14 +794,14 @@ static int check_leaf_item(struct btrfs_fs_info *fs_info,
795 break; 794 break;
796 case BTRFS_CHUNK_ITEM_KEY: 795 case BTRFS_CHUNK_ITEM_KEY:
797 chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk); 796 chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk);
798 ret = btrfs_check_chunk_valid(fs_info, leaf, chunk, 797 ret = btrfs_check_chunk_valid(leaf->fs_info, leaf, chunk,
799 key->offset); 798 key->offset);
800 break; 799 break;
801 case BTRFS_DEV_ITEM_KEY: 800 case BTRFS_DEV_ITEM_KEY:
802 ret = check_dev_item(fs_info, leaf, key, slot); 801 ret = check_dev_item(leaf->fs_info, leaf, key, slot);
803 break; 802 break;
804 case BTRFS_INODE_ITEM_KEY: 803 case BTRFS_INODE_ITEM_KEY:
805 ret = check_inode_item(fs_info, leaf, key, slot); 804 ret = check_inode_item(leaf->fs_info, leaf, key, slot);
806 break; 805 break;
807 } 806 }
808 return ret; 807 return ret;
@@ -952,7 +951,7 @@ static int check_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *leaf,
952 * Check if the item size and content meet other 951 * Check if the item size and content meet other
953 * criteria 952 * criteria
954 */ 953 */
955 ret = check_leaf_item(fs_info, leaf, &key, slot); 954 ret = check_leaf_item(leaf, &key, slot);
956 if (ret < 0) 955 if (ret < 0)
957 return ret; 956 return ret;
958 } 957 }