Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

XArray: Optimise xas_sibling() if !CONFIG_XARRAY_MULTI

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>

+1 -1
+1 -1
lib/xarray.c
··· 1836 1836 struct xa_node *node = xas->xa_node; 1837 1837 unsigned long mask; 1838 1838 1839 - if (!node) 1839 + if (!IS_ENABLED(CONFIG_XARRAY_MULTI) || !node) 1840 1840 return false; 1841 1841 mask = (XA_CHUNK_SIZE << node->shift) - 1; 1842 1842 return (xas->xa_index & mask) >