Skip to content

Commit 84d2d6c

Browse files
josefbacikkdave
authored andcommitted
btrfs: fix csum assert to check objectid of the root
In the future we may have multiple csum roots, so simply check the objectid is for a csum root instead of checking against ->csum_root. Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 29cbcf4 commit 84d2d6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/file-item.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,
801801
const u32 csum_size = fs_info->csum_size;
802802
u32 blocksize_bits = fs_info->sectorsize_bits;
803803

804-
ASSERT(root == fs_info->csum_root ||
804+
ASSERT(root->root_key.objectid == BTRFS_CSUM_TREE_OBJECTID ||
805805
root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID);
806806

807807
path = btrfs_alloc_path();

0 commit comments

Comments
 (0)