]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Use MAS_WR_BUG_ON() in mas_store_prealloc()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 1 Sep 2022 20:27:51 +0000 (16:27 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 13 Feb 2023 13:42:04 +0000 (08:42 -0500)
mas_store_prealloc() should never fail, but if it does due to internal
tree issues then get as much debug information as possible prior to
crashing the kernel.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index fcd779eda3c1a0d863625c03ab0ced59d1c1fc77..1947160ba5599a9eff4455488454b40ce4f40459 100644 (file)
@@ -5698,7 +5698,7 @@ void mas_store_prealloc(struct ma_state *mas, void *entry)
        mas_wr_store_setup(&wr_mas);
        trace_ma_write(__func__, mas, 0, entry);
        mas_wr_store_entry(&wr_mas);
-       BUG_ON(mas_is_err(mas));
+       MAS_WR_BUG_ON(&wr_mas, mas_is_err(mas));
        mas_destroy(mas);
 }
 EXPORT_SYMBOL_GPL(mas_store_prealloc);