diff options
| author | Filipe Manana <[email protected]> | 2022-06-06 09:41:19 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2022-06-21 12:43:27 +0000 |
| commit | 650c9caba32a0167a018cca0fab32a2965d23513 (patch) | |
| tree | 5001996ee3e5778e52e83e2aa79f19e581afd1f1 /scripts/clang-tools/gen_compile_commands.py | |
| parent | btrfs: add missing inode updates on each iteration when replacing extents (diff) | |
| download | kernel-650c9caba32a0167a018cca0fab32a2965d23513.tar.gz kernel-650c9caba32a0167a018cca0fab32a2965d23513.zip | |
btrfs: do not BUG_ON() on failure to migrate space when replacing extents
At btrfs_replace_file_extents(), if we fail to migrate reserved metadata
space from the transaction block reserve into the local block reserve,
we trigger a BUG_ON(). This is because it should not be possible to have
a failure here, as we reserved more space when we started the transaction
than the space we want to migrate. However having a BUG_ON() is way too
drastic, we can perfectly handle the failure and return the error to the
caller. So just do that instead, and add a WARN_ON() to make it easier
to notice the failure if it ever happens (which is particularly useful
for fstests, and the warning will trigger a failure of a test case).
Reviewed-by: Boris Burkov <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions
