diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-11-05 16:45:46 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:49 +0100 |
commit | 84d2d6c7016513f59d98da30da486af3f5244b04 (patch) | |
tree | 11892757e2f20ca2d2af5c66a24ebc0a06e8ed3d /fs/btrfs/file-item.c | |
parent | 29cbcf401793f4e2c871c846edc2191731df2c41 (diff) | |
download | lwn-84d2d6c7016513f59d98da30da486af3f5244b04.tar.gz lwn-84d2d6c7016513f59d98da30da486af3f5244b04.zip |
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 <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 0f2e2ab34828..3acc8b2b5b84 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -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(); |