Message ID | 20230228114306.3328235-13-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2791501wrd; Mon, 27 Feb 2023 19:43:49 -0800 (PST) X-Google-Smtp-Source: AK7set9Bhi4gMEmRv15HTBDYqdIQXiv6Dzv/ngEeE2iRD04ydJS/JlwMVt82FXpjQo9G+TkbIv3e X-Received: by 2002:a17:906:7143:b0:8af:4969:1bb4 with SMTP id z3-20020a170906714300b008af49691bb4mr1168025ejj.53.1677555828816; Mon, 27 Feb 2023 19:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677555828; cv=none; d=google.com; s=arc-20160816; b=hPcuTimkbi8SWRrrjBdP6Ls7pHrvx/GMLOd4snr3ffs64U0FhorWBEZ1wwo42W8cus 46H+4IGayTa5XQzwgefhzM17S/a9LqV0USw3oS6gHwUvv4KHqhFclpXZIYudH4/OY/14 z3DARHndmYqvpSHSF32EyZeduNlInxiEnHzTnoiQ9k9IYVg6z3+sAjTiH1ioJgvgn3bI 8jEk3jsA9qpn7IfrcfzOLoMYKG92g3WEAHfgasukVr6v+S1mg9cUnGRv9+ejVLWn3Cxw 2MyfERupYFZeZhZxep7JTXSueVLB5cddBVo1xwUv7xUopVjOARDgNUoJxrMEGwELad8U PpLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=n8ARxtE/cWbeIv6CT79ZaWncjnAp7bHxe9ZWXeU2gfo=; b=hVKoxodkuh0oir1+hW4l0EhLy4ujS7TtXncHPZ0jbRGcoCI4DwLhEVvxCcVq2rNyM5 WfhY8KvdgepwtCUZ8egzNlwP/LF7tknEN/LrUNEsxHIeb2AO0mCzki9z7K+5lW2RFfnW 4jmfNWbqQm6zgcLlypxkGXAX4jf/IOKVE+IWdihCBdMuA7g4iSMX/B4lRcx0+Ril4SQ4 oLqgLDS430ogZiPZGJc58SswQa28f1puY0Mwjv1Qcw9XBSc4uZMbXlJRWI9+YU7KflHM XAjzVTCyVKtTh3ay+l4HUpvZlOAKOpVm6kDeJ2tt9TYbiNkZLbzU1mem7U4bX/hzY00D AYFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l24-20020aa7d958000000b004acede4b48fsi9485803eds.44.2023.02.27.19.43.25; Mon, 27 Feb 2023 19:43:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230305AbjB1DmU (ORCPT <rfc822;liqunnana@gmail.com> + 99 others); Mon, 27 Feb 2023 22:42:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbjB1Dli (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Feb 2023 22:41:38 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6760A24129; Mon, 27 Feb 2023 19:41:37 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4PQjpN6xlDz4f3wQs; Tue, 28 Feb 2023 11:41:32 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDnjOrod_1jpDeZEQ--.58449S14; Tue, 28 Feb 2023 11:41:34 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, ojaswin@linux.ibm.com, ritesh.list@gmail.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH v2 12/20] ext4: remove dead check in mb_buddy_mark_free Date: Tue, 28 Feb 2023 19:42:58 +0800 Message-Id: <20230228114306.3328235-13-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230228114306.3328235-1-shikemeng@huaweicloud.com> References: <20230228114306.3328235-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgDnjOrod_1jpDeZEQ--.58449S14 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr4rJr4xZF45Gr18Gw43trb_yoW3Cwc_KF y3A3y8JrWftr4Fka48Ar4vgr48K3Z5CrW7X3y5tr4xWF1UW393W34DJrn3Ar1xu3y2yrWD CFn5Ga4xuF40gjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbqxFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AK xVW8Jr0_Cr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JV WxJwCI42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7sRiVb yDUUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759044780808697263?= X-GMAIL-MSGID: =?utf-8?q?1759044780808697263?= |
Series |
Some bugfix and cleanup to mballoc
|
|
Commit Message
Kemeng Shi
Feb. 28, 2023, 11:42 a.m. UTC
We always adjust first to even number and adjust last to odd number, so
first == last will never happen. Remove this dead check.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
fs/ext4/mballoc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index fea835d8d241..f40af7430fca 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -1718,7 +1718,8 @@ static void mb_buddy_mark_free(struct ext4_buddy *e4b, int first, int last) break; order++; - if (first == last || !(buddy2 = mb_find_buddy(e4b, order, &max))) { + buddy2 = mb_find_buddy(e4b, order, &max); + if (!buddy2) { mb_clear_bits(buddy, first, last - first + 1); e4b->bd_info->bb_counters[order - 1] += last - first + 1; break;