From: Liam R. Howlett Date: Fri, 25 Feb 2022 14:59:15 +0000 (-0500) Subject: maple_tree: Fix bool return in mas_wr_append() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=130ba77223275cf34548eeff7778bfe54b9f5134;p=users%2Fjedix%2Flinux-maple.git maple_tree: Fix bool return in mas_wr_append() Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index bd19e087214e..d782e747771b 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4169,8 +4169,10 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas) mas->offset = new_end; wr_mas->pivots[end] = mas->index - 1; - return 1; - } else if ((mas->index == wr_mas->r_min) && (mas->last < wr_mas->r_max)) { + return true; + } + + if ((mas->index == wr_mas->r_min) && (mas->last < wr_mas->r_max)) { if (new_end < node_pivots) wr_mas->pivots[new_end] = wr_mas->pivots[end]; @@ -4180,9 +4182,10 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas) wr_mas->pivots[end] = mas->last; rcu_assign_pointer(wr_mas->slots[end], wr_mas->entry); - return 1; + return true; } - return 0; + + return false; } static inline void mas_wr_modify(struct ma_wr_state *wr_mas)