From: Kemeng Shi Date: Fri, 13 Dec 2024 12:25:22 +0000 (+0800) Subject: Xarray: remove repeat check in xas_squash_marks() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1988b318b32d3a0260e05bf6643990230df35843;p=users%2Fwilly%2Fxarray.git Xarray: remove repeat check in xas_squash_marks() Caller of xas_squash_marks() has ensured xas->xa_sibs is non-zero. Just remove repeat check of xas->xa_sibs in xas_squash_marks(). Link: https://lkml.kernel.org/r/20241213122523.12764-5-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Cc: Mattew Wilcox Signed-off-by: Andrew Morton --- diff --git a/lib/xarray.c b/lib/xarray.c index ecd2e4f71aa8..2386423865a0 100644 --- a/lib/xarray.c +++ b/lib/xarray.c @@ -128,9 +128,6 @@ static void xas_squash_marks(const struct xa_state *xas) unsigned int mark = 0; unsigned int limit = xas->xa_offset + xas->xa_sibs + 1; - if (!xas->xa_sibs) - return; - do { unsigned long *marks = xas->xa_node->marks[mark]; if (find_next_bit(marks, limit, xas->xa_offset + 1) == limit)