summaryrefslogtreecommitdiff
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-06-03 08:55:04 +0300
committerDavid Sterba <dsterba@suse.com>2020-07-27 13:55:26 +0300
commit7bfa9535019b1ca0696d0a0590a3fd657224ae2f (patch)
tree162c1fecf1d79c2d83ab4a53c3c44a46b30acf50 /fs/btrfs/relocation.c
parentc3504372699bff6daeda207b4e30256c39f584c1 (diff)
downloadlinux-7bfa9535019b1ca0696d0a0590a3fd657224ae2f.tar.xz
btrfs: make btrfs_reloc_clone_csums take btrfs_inode
It really wants btrfs_inode and not a vfs inode. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 8051aec5378e..9235c671bef8 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3870,9 +3870,9 @@ out:
* cloning checksum properly handles the nodatasum extents.
* it also saves CPU time to re-calculate the checksum.
*/
-int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len)
+int btrfs_reloc_clone_csums(struct btrfs_inode *inode, u64 file_pos, u64 len)
{
- struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
+ struct btrfs_fs_info *fs_info = inode->root->fs_info;
struct btrfs_ordered_sum *sums;
struct btrfs_ordered_extent *ordered;
int ret;
@@ -3880,10 +3880,10 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len)
u64 new_bytenr;
LIST_HEAD(list);
- ordered = btrfs_lookup_ordered_extent(BTRFS_I(inode), file_pos);
+ ordered = btrfs_lookup_ordered_extent(inode, file_pos);
BUG_ON(ordered->file_offset != file_pos || ordered->num_bytes != len);
- disk_bytenr = file_pos + BTRFS_I(inode)->index_cnt;
+ disk_bytenr = file_pos + inode->index_cnt;
ret = btrfs_lookup_csums_range(fs_info->csum_root, disk_bytenr,
disk_bytenr + len - 1, &list, 0);
if (ret)