mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: defrag: change BUG_ON to assertion in btrfs_defrag_leaves()
[ Upstream commit 51d4be540054be32d7ce28b63ea9b84ac6ff1db2 ] The BUG_ON verifies a condition that should be guaranteed by the correct use of the path search (with keep_locks and lowest_level set), an assertion is the suitable check. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a7fec145b0
commit
315471004b
1 changed files with 1 additions and 1 deletions
|
@ -416,7 +416,7 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
|
|||
* keep_locks set and lowest_level is 1, regardless of the value of
|
||||
* path->slots[1].
|
||||
*/
|
||||
BUG_ON(path->locks[1] == 0);
|
||||
ASSERT(path->locks[1] != 0);
|
||||
ret = btrfs_realloc_node(trans, root,
|
||||
path->nodes[1], 0,
|
||||
&last_ret,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue