diff options
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index ecbc63d3143e..9a2ec79e8cfb 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -1828,7 +1828,6 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root, | |||
1828 | int found = 0; | 1828 | int found = 0; |
1829 | struct extent_buffer *eb; | 1829 | struct extent_buffer *eb; |
1830 | struct btrfs_inode_extref *extref; | 1830 | struct btrfs_inode_extref *extref; |
1831 | struct extent_buffer *leaf; | ||
1832 | u32 item_size; | 1831 | u32 item_size; |
1833 | u32 cur_offset; | 1832 | u32 cur_offset; |
1834 | unsigned long ptr; | 1833 | unsigned long ptr; |
@@ -1856,9 +1855,8 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root, | |||
1856 | btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK); | 1855 | btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK); |
1857 | btrfs_release_path(path); | 1856 | btrfs_release_path(path); |
1858 | 1857 | ||
1859 | leaf = path->nodes[0]; | 1858 | item_size = btrfs_item_size_nr(eb, slot); |
1860 | item_size = btrfs_item_size_nr(leaf, slot); | 1859 | ptr = btrfs_item_ptr_offset(eb, slot); |
1861 | ptr = btrfs_item_ptr_offset(leaf, slot); | ||
1862 | cur_offset = 0; | 1860 | cur_offset = 0; |
1863 | 1861 | ||
1864 | while (cur_offset < item_size) { | 1862 | while (cur_offset < item_size) { |
@@ -1872,7 +1870,7 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root, | |||
1872 | if (ret) | 1870 | if (ret) |
1873 | break; | 1871 | break; |
1874 | 1872 | ||
1875 | cur_offset += btrfs_inode_extref_name_len(leaf, extref); | 1873 | cur_offset += btrfs_inode_extref_name_len(eb, extref); |
1876 | cur_offset += sizeof(*extref); | 1874 | cur_offset += sizeof(*extref); |
1877 | } | 1875 | } |
1878 | btrfs_tree_read_unlock_blocking(eb); | 1876 | btrfs_tree_read_unlock_blocking(eb); |