Skip to content

Commit 2282d4f

Browse files
committed
btrfs: use btrfs_is_data_reloc_root() where not done yet
Two remaining cases where we can use the helper. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 4900749 commit 2282d4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/btrfs/file-item.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ int btrfs_lookup_bio_sums(struct btrfs_bio *bbio)
427427
memset(csum_dst, 0, csum_size);
428428
count = 1;
429429

430-
if (btrfs_root_id(inode->root) == BTRFS_DATA_RELOC_TREE_OBJECTID) {
430+
if (btrfs_is_data_reloc_root(inode->root)) {
431431
u64 file_offset = bbio->file_offset + bio_offset;
432432

433433
btrfs_set_extent_bit(&inode->io_tree, file_offset,

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static void __cold btrfs_print_data_csum_error(struct btrfs_inode *inode,
308308
const u32 csum_size = root->fs_info->csum_size;
309309

310310
/* For data reloc tree, it's better to do a backref lookup instead. */
311-
if (btrfs_root_id(root) == BTRFS_DATA_RELOC_TREE_OBJECTID)
311+
if (btrfs_is_data_reloc_root(root))
312312
return print_data_reloc_error(inode, logical_start, csum,
313313
csum_expected, mirror_num);
314314

0 commit comments

Comments
 (0)