linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mpale_tree: remove redundant check on mas_wr_append.
@ 2023-11-11 10:54 Levi Yun
  2023-11-12 15:37 ` Liam R. Howlett
  0 siblings, 1 reply; 2+ messages in thread
From: Levi Yun @ 2023-11-11 10:54 UTC (permalink / raw)
  To: Liam.Howlett; +Cc: maple-tree, linux-mm, linux-kernel, Levi Yun

Checking data appending on node is done by
    mas->offsest == end
which is identical with:
    mas->offset == wr_mas->node_end

Remove redundant check and there shouldn't be functional change.

Signed-off-by: Levi Yun <ppbuk5246@gmail.com>
---
 lib/maple_tree.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index bb24d84a4922..d16b8e211174 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -4141,9 +4141,6 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas,
 	if (mt_in_rcu(mas->tree))
 		return false;
 
-	if (mas->offset != wr_mas->node_end)
-		return false;
-
 	end = wr_mas->node_end;
 	if (mas->offset != end)
 		return false;
-- 
2.41.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mpale_tree: remove redundant check on mas_wr_append.
  2023-11-11 10:54 [PATCH] mpale_tree: remove redundant check on mas_wr_append Levi Yun
@ 2023-11-12 15:37 ` Liam R. Howlett
  0 siblings, 0 replies; 2+ messages in thread
From: Liam R. Howlett @ 2023-11-12 15:37 UTC (permalink / raw)
  To: Levi Yun; +Cc: maple-tree, linux-mm, linux-kernel, Peng Zhang

* Levi Yun <ppbuk5246@gmail.com> [231111 05:55]:
> Checking data appending on node is done by
>     mas->offsest == end
> which is identical with:
>     mas->offset == wr_mas->node_end
> 
> Remove redundant check and there shouldn't be functional change.

This was already sent out by Peng.

See http://lists.infradead.org/pipermail/maple-tree/2023-November/003051.html

Thanks,
Liam

> 
> Signed-off-by: Levi Yun <ppbuk5246@gmail.com>
> ---
>  lib/maple_tree.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index bb24d84a4922..d16b8e211174 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -4141,9 +4141,6 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas,
>  	if (mt_in_rcu(mas->tree))
>  		return false;
>  
> -	if (mas->offset != wr_mas->node_end)
> -		return false;
> -
>  	end = wr_mas->node_end;
>  	if (mas->offset != end)
>  		return false;
> -- 
> 2.41.0
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-12 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-11 10:54 [PATCH] mpale_tree: remove redundant check on mas_wr_append Levi Yun
2023-11-12 15:37 ` Liam R. Howlett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox