]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: convert BUG_ON() in btrfs_truncate_inode_items to ASSERT
authorJosef Bacik <josef@toxicpanda.com>
Fri, 3 Dec 2021 22:18:16 +0000 (17:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:25 +0000 (14:18 +0100)
commit2c9a724e414a65b7b50b7ef9b478886b4e6550a6
tree9b77d1f61311d34e2807b43db4bdafb6d1f0e217
parentee06a963d08ae8eddc9c64260b367bfec7dfc3e8
btrfs: convert BUG_ON() in btrfs_truncate_inode_items to ASSERT

We have a correctness BUG_ON() in btrfs_truncate_inode_items to make
sure that we're always using min_type == BTRFS_EXTENT_DATA_KEY if
new_size is > 0.  Convert this to an ASSERT.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode-item.c