diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-11-13 16:44:41 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 22:42:25 +0100 |
| commit | 5d8222a50ad37c98455da08b33ce49fe6b726c72 (patch) | |
| tree | 83c32cac76b39946459d4c73bdc1606e05c03fdd /fs/btrfs/dev-replace.c | |
| parent | 027358a0900913a395f99d911108375a7f1c50f4 (diff) | |
btrfs: abort transaction on item count overflow in __push_leaf_left()
If we try to push an item count from the right leaf that is greater than
the number of items in the leaf, we just emit a warning. This should
never happen but if it does we get an underflow in the new number of
items in the right leaf and chaos follows from it. So replace the warning
with proper error handling, by aborting the transaction and returning
-EUCLEAN, and proper logging by using btrfs_crit() instead of WARN(),
which gives us proper formatting and information about the filesystem.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions