lkml.org 
[lkml]   [2021]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 答复 : [PATCH] rbtree: stop iteration early in rb_find_first
On Wed, Aug 25, 2021 at 04:01:53PM +0000, Li,Rongqing wrote:
>
> >>
> >>
> >> 10
> >> /
> >> 5
> >> \
> >> 10
> >>
> >> The search would stop after visiting node 5, and miss the leaf which
> >> is the expected node to be returned.
>
> thanks for explanation.
>
> >Just to clarify; the current code *does* work here. The proposed patch
> >breaks it.
>
>
> true, my patch is wrong.
>
> but rb_find_first seems have other issue. when the key is equal, we should search right leaf, not left leaf

That again breaks the above case.

\
 
 \ /
  Last update: 2021-08-25 19:21    [W:0.044 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site