mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
btrfs: replace BUG() with error handling in __btrfs_balance()
We search with offset (u64)-1 which should never match exactly. Previously this was handled with BUG(). Now logs an error and return -EUCLEAN. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Adarsh Das <adarshdas950@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1c88823a19
commit
be6324a809
1 changed files with 8 additions and 2 deletions
|
|
@ -4367,8 +4367,14 @@ again:
|
|||
* this shouldn't happen, it means the last relocate
|
||||
* failed
|
||||
*/
|
||||
if (ret == 0)
|
||||
BUG(); /* FIXME break ? */
|
||||
if (unlikely(ret == 0)) {
|
||||
btrfs_err(fs_info,
|
||||
"unexpected exact match of CHUNK_ITEM in chunk tree, offset 0x%llx",
|
||||
key.offset);
|
||||
mutex_unlock(&fs_info->reclaim_bgs_lock);
|
||||
ret = -EUCLEAN;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = btrfs_previous_item(chunk_root, path, 0,
|
||||
BTRFS_CHUNK_ITEM_KEY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue