]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/interval_tree: fix the comment of interval_tree_span_iter_next_gap()
authorWei Yang <richard.weiyang@gmail.com>
Mon, 10 Mar 2025 07:49:38 +0000 (07:49 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 19:17:01 +0000 (12:17 -0700)
commitceb08ee965a20dd1eecc4cdcaa0328fc7c03b1e5
tree62eacf912b37e480d434e27cf7f3254875a06212
parent19811285784f7f3d4abaa6e94623f2e7d10219d0
lib/interval_tree: fix the comment of interval_tree_span_iter_next_gap()

The comment of interval_tree_span_iter_next_gap() is not exact, nodes[1]
is not always !NULL.

There are threes cases here. If there is an interior hole, the statement
is correct. If there is a tailing hole or the contiguous used range span
to the end, nodes[1] is NULL.

Link: https://lkml.kernel.org/r/20250310074938.26756-8-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michel Lespinasse <michel@lespinasse.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/interval_tree.c