From: Liam R. Howlett Date: Tue, 6 May 2025 15:50:13 +0000 (-0400) Subject: rename mas_wr_rebalance_calc() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2678cc859cd7115a69256f9a5047b6ec1fd46e4d;p=users%2Fjedix%2Flinux-maple.git rename mas_wr_rebalance_calc() Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index c0d3f3254ccf..68e5ff03a36f 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3760,14 +3760,14 @@ static void mt_wr_split_data(struct ma_node_info *src, } /* - * mas_wr_rebalance_calc() - Try to calculate a rebalance that will work + * rebalance_calc() - Try to calculate a rebalance that will work * @data_size: The total data to be written * @mt: The maple node types splitting the data * * Returns: 0 on failure, the split location otherwise. */ static inline -unsigned char mas_wr_rebalance_calc(unsigned char data_size, +unsigned char rebalance_calc(unsigned char data_size, enum maple_type mt) { unsigned char space, split; @@ -3802,7 +3802,7 @@ bool can_rebalance_right(struct ma_state *tmp_mas, struct ma_node_info *parent, mas_descend(tmp_mas); mni_mas_init(src2, tmp_mas); mni_set_end(src2); - sd->split = mas_wr_rebalance_calc(src2->end + sd->new_end, src2->type); + sd->split = rebalance_calc(src2->end + sd->new_end, src2->type); if (!sd->split) { mas_ascend(tmp_mas); tmp_mas->offset--; @@ -3823,7 +3823,7 @@ bool can_rebalance_left(struct ma_state *tmp_mas, struct ma_node_info *parent, mas_descend(tmp_mas); mni_mas_init(src2, tmp_mas); mni_set_end(src2); - sd->split = mas_wr_rebalance_calc(src2->end + sd->new_end, src2->type); + sd->split = rebalance_calc(src2->end + sd->new_end, src2->type); if (!sd->split) { mas_ascend(tmp_mas); tmp_mas->offset++;