]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Xarray: remove repeat check in xas_squash_marks()
authorKemeng Shi <shikemeng@huaweicloud.com>
Fri, 13 Dec 2024 12:25:22 +0000 (20:25 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 25 Jan 2025 06:47:27 +0000 (22:47 -0800)
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 <shikemeng@huaweicloud.com>
Cc: Mattew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/xarray.c

index ecd2e4f71aa86d667d24cab3bcd62ff844dbef6d..2386423865a0a9174f88acd73436bbec5e146327 100644 (file)
@@ -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)