diff options
| author | David Sterba <[email protected]> | 2025-04-17 09:17:03 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-05-15 12:30:47 +0000 |
| commit | 9e0a739a9e83eb28ceb0b1e97861c88f177a7f18 (patch) | |
| tree | 4dcfde1267e8e9f154fbadafa2fd0850c4f0c049 /fs/btrfs/relocation.c | |
| parent | btrfs: convert WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG)) to DEBUG_WARN (diff) | |
| download | kernel-9e0a739a9e83eb28ceb0b1e97861c88f177a7f18.tar.gz kernel-9e0a739a9e83eb28ceb0b1e97861c88f177a7f18.zip | |
btrfs: convert ASSERT(0) with handled errors to DEBUG_WARN()
The use of ASSERT(0) is maybe useful for some cases but more like a
notice for developers. Assertions can be compiled in independently so
convert it to a debugging helper.
The difference is that it's just a warning and will not end up in BUG().
The converted cases are in connection with proper error handling.
Reviewed-by: Josef Bacik <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/relocation.c')
| -rw-r--r-- | fs/btrfs/relocation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 6ba9fcb53c33..97c223aa90b6 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1931,11 +1931,11 @@ static int record_reloc_root_in_trans(struct btrfs_trans_handle *trans, * reloc root without a corresponding root this could return ENOENT. */ if (IS_ERR(root)) { - ASSERT(0); + DEBUG_WARN("error %ld reading root for reloc root", PTR_ERR(root)); return PTR_ERR(root); } if (root->reloc_root != reloc_root) { - ASSERT(0); + DEBUG_WARN("unexpected reloc root found"); btrfs_err(fs_info, "root %llu has two reloc roots associated with it", reloc_root->root_key.offset); |
