From 9e0a739a9e83eb28ceb0b1e97861c88f177a7f18 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 17 Apr 2025 11:17:03 +0200 Subject: 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 Signed-off-by: David Sterba --- fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/btrfs/backref.c') diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index e76e1845cfce..6ee0259048cd 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -3617,7 +3617,7 @@ int btrfs_backref_finish_upper_links(struct btrfs_backref_cache *cache, /* Sanity check, we shouldn't have any unchecked nodes */ if (!upper->checked) { - ASSERT(0); + DEBUG_WARN("we should not have any unchecked nodes"); return -EUCLEAN; } -- cgit v1.2.3