From: Matthew Wilcox (Oracle) Date: Thu, 27 Feb 2020 12:37:40 +0000 (-0500) Subject: XArray: Optimise xas_sibling() if !CONFIG_XARRAY_MULTI X-Git-Tag: v5.7-rc1~132^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8e93e3f22d9fd2e6a3ccae3623c3af8789ccfc0;p=thirdparty%2Fkernel%2Flinux.git XArray: Optimise xas_sibling() if !CONFIG_XARRAY_MULTI If CONFIG_XARRAY_MULTI is disabled, then xas_sibling() must be false. Reported-by: JaeJoon Jung Signed-off-by: Matthew Wilcox (Oracle) --- diff --git a/lib/xarray.c b/lib/xarray.c index 05324cf571f4c..f448bcd263acc 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) >