]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: add debug build only WARN
authorDavid Sterba <dsterba@suse.com>
Thu, 17 Apr 2025 09:17:01 +0000 (11:17 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:47 +0000 (14:30 +0200)
commit3db15c6ca6feb2c5000a1cbb39c33866e0349abd
treeac3182235a80a475823adfcf90c5f6fa352f5c5a
parent94cb8d7144340e760644b2f104586da4717d1f32
btrfs: add debug build only WARN

Add conditional WARN() wrapper that's enabled only in debug build. It
should be used for unexpected conditions that should be noisy.  Use it
instead of ASSERT(0). As it will not lead to BUG() make sure that
continuing is still possible, e.g. the error is handled anyway.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/messages.h