Commit 84d2d6c7 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba
Browse files

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: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 29cbcf40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -801,7 +801,7 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,
	const u32 csum_size = fs_info->csum_size;
	u32 blocksize_bits = fs_info->sectorsize_bits;

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

	path = btrfs_alloc_path();