diff options
| author | Matthew Wilcox (Oracle) <[email protected]> | 2020-02-27 12:37:40 +0000 |
|---|---|---|
| committer | Matthew Wilcox (Oracle) <[email protected]> | 2020-02-27 12:37:40 +0000 |
| commit | d8e93e3f22d9fd2e6a3ccae3623c3af8789ccfc0 (patch) | |
| tree | e125224c51ccab31358311660a79f176175edf2f /lib/xarray.c | |
| parent | ida: remove abandoned macros (diff) | |
| download | kernel-d8e93e3f22d9fd2e6a3ccae3623c3af8789ccfc0.tar.gz kernel-d8e93e3f22d9fd2e6a3ccae3623c3af8789ccfc0.zip | |
XArray: Optimise xas_sibling() if !CONFIG_XARRAY_MULTI
If CONFIG_XARRAY_MULTI is disabled, then xas_sibling() must be false.
Reported-by: JaeJoon Jung <[email protected]>
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Diffstat (limited to 'lib/xarray.c')
| -rw-r--r-- | lib/xarray.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xarray.c b/lib/xarray.c index 05324cf571f4..f448bcd263ac 100644 --- 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) > |
