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/send.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/send.c')
| -rw-r--r-- | fs/btrfs/send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 116d67ab93dc..095bdd11398d 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -383,11 +383,11 @@ static void inconsistent_snapshot_error(struct send_ctx *sctx, result_string = "updated"; break; case BTRFS_COMPARE_TREE_SAME: - ASSERT(0); + DEBUG_WARN("no change between trees"); result_string = "unchanged"; break; default: - ASSERT(0); + DEBUG_WARN("unexpected comparison result %d", result); result_string = "unexpected"; } |
