From patchwork Wed Dec 18 15:46:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13913111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17386E77188 for ; Wed, 18 Dec 2024 06:48:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E48656B0099; Wed, 18 Dec 2024 01:48:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B89BE6B0098; Wed, 18 Dec 2024 01:48:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A226F6B0099; Wed, 18 Dec 2024 01:48:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 814366B0098 for ; Wed, 18 Dec 2024 01:48:18 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 43537160B31 for ; Wed, 18 Dec 2024 06:48:18 +0000 (UTC) X-FDA: 82907149374.27.C7E90D8 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by imf11.hostedemail.com (Postfix) with ESMTP id F1E4240003 for ; Wed, 18 Dec 2024 06:47:44 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734504475; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bxIw4umX4p8FjSyJOZOfGED/8t0TaNg5KTYmBw60MZs=; b=n7I2rnsKj2wQMJlCBnL4el/08QhAqtpNgBwtNnPqIehOXeLpAWM07iKAtk9E/Dwu0kTK48 IzVBSckaLRbzc8reuTkUQlvmFEnv/FfBFb1bU/1OEsDRcXKRHtuaf8RzkTyaK+KgEweiCc rnHc2SkQ+PsDS7u5W6mez7PzaoCcNB8= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734504475; a=rsa-sha256; cv=none; b=VdmJJZsVKbD0I9Z3bJK87bT0V67QVbFbM4i2s9IrIj+3yS336Dqw3RDeNK1qPHZMop7mcV +fOK/DqBOczmq1ioP7BV3ZcBFjML7neP8C3hpBCjsjod1KuSiveOT+bHS01APcZWj0o6nE 0G7tkBJFbOsgLQJVDkltIkJl8a+TMAE= Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4YCkl94J7Jz4f3kFQ for ; Wed, 18 Dec 2024 14:47:49 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 1B85C1A018D for ; Wed, 18 Dec 2024 14:48:09 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.101.6]) by APP1 (Coremail) with SMTP id cCh0CgA33a4mcGJnxKU7Ew--.4083S6; Wed, 18 Dec 2024 14:48:08 +0800 (CST) From: Kemeng Shi To: akpm@linux-foundation.org, willy@infradead.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org Subject: [PATCH v4 4/5] Xarray: remove repeat check in xas_squash_marks() Date: Wed, 18 Dec 2024 23:46:12 +0800 Message-Id: <20241218154613.58754-5-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20241218154613.58754-1-shikemeng@huaweicloud.com> References: <20241218154613.58754-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: cCh0CgA33a4mcGJnxKU7Ew--.4083S6 X-Coremail-Antispam: 1UD129KBjvdXoWrtFWxKF1Dtr4kXFy7Xw4kCrg_yoWxtwb_Za 10yr1vyr1UCrn7XwsIkFs8tryjkryvqF9rKFW8Ja43ur10qry5WF4vqr15Aa4kZw4ayFy7 JF45Zr1Y9r15GjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbqkYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l87I20VAvwVAaII0Ic2I_JFv_Gryl82 xGYIkIc2x26280x7IE14v26r126s0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC 64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM2 8EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq 3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY1x0262kKe7 AKxVWUAVWUtwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02 F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw 1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7Cj xVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r 1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07ja g4hUUUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-Rspamd-Server: rspam05 X-Stat-Signature: mffohtc6hd7og6yu9qzjfe6m5orce9z5 X-Rspamd-Queue-Id: F1E4240003 X-Rspam-User: X-HE-Tag: 1734504464-438820 X-HE-Meta: U2FsdGVkX199Yebhp+s0AMkUSU/4bLN9m+Nl4aRanT+bkgtHOxPW45tscyoiI7tBn4OFDcwt+RuI2Wl/6yfle1LIqSoqWpW87qPVtAoEFFeGo83yPJBwR1jYqy1D32wQPSuGRBdo5EsWnYQx2qGjQ5jewpDNInWQykygNiQ49v019GuzdjxveeugTggvxijuEK8ViVTQPNPMIp2kOqqmZUHpyP6yrjmWz9QVxOMTfcLEec/M5IfxEf/AIyAKlvkGlIUbKLJTkATP+8IoQD8+gzQNtjE3VmUS4ProLFPWb41bFP9f5blLVa2l7NXfm5LYaSpdzzZ7LssQ7q5dlKiwZSEugoxVBFGgu9pXqfEWhbiXTpSKRjfpQmN6iTpc7T8iRzTo+lQzlrtMCqej7uZ5RyUdr/YOxPE2hZ7im7gyeeaDrnj84pTQTU8GY1j0FM0MUgXFDrms0PgBCU5HWYIOFn7DAGesNns1GzWq//QyEeG5YN23mk0W//KtNRu7+AuQonvajArRqfj81t4WCJwLz3RA/6cgccwcMZE2AtrauJBmuEq31WdvlOAznAIWE23Fz2Ai0Ps9/3wWHYQ2qobzrixZSYEgFYhXHZ1d2jmduvsBTA1V2d7/noPyGUwzVjHlYyBypXrIhepkIg82SBfnnZkMgT/DGHUmZOCMvdoM/IvWu0/VQpOaL+cZ19oTXEljdOYRhmJX2ReultJHk+OueNOGSkz0M6tlpPij5FilL+Or9w7icbcyriR6P5OK3IhbeMXzb0BTWDzqXGWK5+kQk6Sq4vPDkqteJqozemPxdpNSc7QcRAk7WiVKDzUwJE1BCUlOKKNjtpOpLTxe0qNqNyrDTTscMFq2r6z1bfbc6YQ7vxaTG76iPWNulbote7tqtcWl0ARKoKZD25qH9n9be30fcWAWDLcqOeSEXYMWJ+n0hOjvMmuT6ECxRnF6rD9MrclGKyZW43K2y0dsBJq tOqKQxqd P0WXuu3S2wvab6gsg938Efc63DeISLFuGnKzAA/RrpuhowBR/NO8KKl3QDCA13/Fvr0V/A3OM5TAlqOqF55NyKZpoUg01X4f+Xv7skGxBqamxZHmN3YMNYehB7fZBGUwbCs40a9Jf7+9GWHdwM+iK5/uYxQd9lppXnEWFTRdAtC9HsZ1fgUZi8CzLKB1YWjv72sWL0c64t3PoSTDbdRdfgmETzw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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(). Signed-off-by: Kemeng Shi --- lib/xarray.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/xarray.c b/lib/xarray.c index 3fac3f2cea9d..4231af284bd8 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)