summaryrefslogtreecommitdiffstats
path: root/lib/xarray.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-12-17 17:46:26 +0100
committerIngo Molnar <mingo@kernel.org>2018-12-17 17:46:26 +0100
commit76aea1eeb98d2d75d9297fda777efeffe3657aeb (patch)
tree18fdf94ec846b553f1e60438279a3b449897189b /lib/xarray.c
parent43b9e4febc66b98d83cc1560196d56ac7fef3c32 (diff)
parent7566ec393f4161572ba6f11ad5171fd5d59b0fbd (diff)
downloadlinux-76aea1eeb98d2d75d9297fda777efeffe3657aeb.tar.bz2
Merge tag 'v4.20-rc7' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/xarray.c')
-rw-r--r--lib/xarray.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/xarray.c b/lib/xarray.c
index bbacca576593..5f3f9311de89 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -1131,7 +1131,7 @@ void *xas_find_marked(struct xa_state *xas, unsigned long max, xa_mark_t mark)
entry = xa_head(xas->xa);
xas->xa_node = NULL;
if (xas->xa_index > max_index(entry))
- goto bounds;
+ goto out;
if (!xa_is_node(entry)) {
if (xa_marked(xas->xa, mark))
return entry;
@@ -1180,11 +1180,9 @@ void *xas_find_marked(struct xa_state *xas, unsigned long max, xa_mark_t mark)
}
out:
- if (!max)
+ if (xas->xa_index > max)
goto max;
-bounds:
- xas->xa_node = XAS_BOUNDS;
- return NULL;
+ return set_bounds(xas);
max:
xas->xa_node = XAS_RESTART;
return NULL;