lkml.org 
[lkml]   [2023]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 11/34] maple_tree: Use MAS_BUG_ON() in mas_set_height()
    Date
    Use MAS_BUG_ON() instead of MT_BUG_ON() to get the maple state
    information. In the unlikely even of a tree height of > 31, try to increase
    the probability of useful information being logged.

    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 441592be039a2..f1ce3852712db 100644
    --- a/lib/maple_tree.c
    +++ b/lib/maple_tree.c
    @@ -194,7 +194,7 @@ static void mas_set_height(struct ma_state *mas)
    unsigned int new_flags = mas->tree->ma_flags;

    new_flags &= ~MT_FLAGS_HEIGHT_MASK;
    - MT_BUG_ON(mas->tree, mas->depth > MAPLE_HEIGHT_MAX);
    + MAS_BUG_ON(mas, mas->depth > MAPLE_HEIGHT_MAX);
    new_flags |= mas->depth << MT_FLAGS_HEIGHT_OFFSET;
    mas->tree->ma_flags = new_flags;
    }
    --
    2.39.2
    \
     
     \ /
      Last update: 2023-04-25 16:14    [W:4.290 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site