diff options
| author | David Sterba <[email protected]> | 2025-04-17 09:17:02 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-05-15 12:30:47 +0000 |
| commit | ed50ab0fec1a881a379bea7187994ff6cbe2fc58 (patch) | |
| tree | f9c589fb6a275851d593f2c2016c6a9cd40f9606 /fs/btrfs/extent-tree.c | |
| parent | btrfs: add debug build only WARN (diff) | |
| download | kernel-ed50ab0fec1a881a379bea7187994ff6cbe2fc58.tar.gz kernel-ed50ab0fec1a881a379bea7187994ff6cbe2fc58.zip | |
btrfs: convert WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG)) to DEBUG_WARN
Use the conditional warning instead of typing the whole condition.
Optional message is printed where it seems clear what could be the
problem.
Conversion is left out in btree_csum_one_bio() because of the additional
condition.
Reviewed-by: Josef Bacik <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
| -rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index a68a8a07caff..a7564b39eb5c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6397,7 +6397,7 @@ static int btrfs_trim_free_extents(struct btrfs_device *device, u64 *trimmed) /* Check if there are any CHUNK_* bits left */ if (start > device->total_bytes) { - WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG)); + DEBUG_WARN(); btrfs_warn_in_rcu(fs_info, "ignoring attempt to trim beyond device size: offset %llu length %llu device %s device size %llu", start, end - start + 1, |
