lkml.org 
[lkml]   [2023]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 13/35] maple_tree: Use MAS_WR_BUG_ON() in mas_store_prealloc()
    Date
    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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/lib/maple_tree.c b/lib/maple_tree.c
    index 824967872d42..d5ccf7bcf3b5 100644
    --- a/lib/maple_tree.c
    +++ b/lib/maple_tree.c
    @@ -5761,7 +5761,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);
    --
    2.39.2
    \
     
     \ /
      Last update: 2023-05-18 21:12    [W:4.151 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site