projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a00e7c
)
XArray: Optimise xas_sibling() if !CONFIG_XARRAY_MULTI
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Thu, 27 Feb 2020 12:37:40 +0000
(07:37 -0500)
committer
Matthew Wilcox (Oracle)
<willy@infradead.org>
Thu, 27 Feb 2020 12:37:40 +0000
(07:37 -0500)
If CONFIG_XARRAY_MULTI is disabled, then xas_sibling() must be false.
Reported-by: JaeJoon Jung <rgbi3307@gmail.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
lib/xarray.c
patch
|
blob
|
history
diff --git
a/lib/xarray.c
b/lib/xarray.c
index
05324cf
..
f448bcd
100644
(file)
--- a/
lib/xarray.c
+++ b/
lib/xarray.c
@@
-1836,7
+1836,7
@@
static bool xas_sibling(struct xa_state *xas)
struct xa_node *node = xas->xa_node;
unsigned long mask;
- if (!node)
+ if (!
IS_ENABLED(CONFIG_XARRAY_MULTI) || !
node)
return false;
mask = (XA_CHUNK_SIZE << node->shift) - 1;
return (xas->xa_index & mask) >