Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

maple_tree: remove a BUG_ON() in mas_alloc_nodes()

Remove a BUG_ON() right before a WARN_ON() with the same condition.

Calling WARN_ON() and BUG_ON() here is definitely wrong. Since the goal is
generally to remove BUG_ON() invocations from the kernel, keep only the
WARN_ON().

Link: https://lkml.kernel.org/r/20250213114453.1078318-1-ptesarik@suse.com
Fixes: 067311d33e65 ("maple_tree: separate ma_state node from status")
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Petr Tesarik and committed by
Andrew Morton
18ea595a 0b6d4853

-1
-1
lib/maple_tree.c
··· 1242 1242 if (mas->mas_flags & MA_STATE_PREALLOC) { 1243 1243 if (allocated) 1244 1244 return; 1245 - BUG_ON(!allocated); 1246 1245 WARN_ON(!allocated); 1247 1246 } 1248 1247