Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3425029rwe; Sun, 16 Apr 2023 20:05:25 -0700 (PDT) X-Google-Smtp-Source: AKy350YB9URH1og/H8jq4HNhHYfBQNpV7css39vV6FwOsUyDbKaAq288knUde900H1J+n2kb3BiT X-Received: by 2002:a17:903:41cc:b0:1a6:413c:4a54 with SMTP id u12-20020a17090341cc00b001a6413c4a54mr14296103ple.1.1681700725534; Sun, 16 Apr 2023 20:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681700725; cv=none; d=google.com; s=arc-20160816; b=i/FteNAWZntuLudCuQm1t2MKw5FZVALgRZxPBHadQFgVxAmI4Je1RSE3XZDOcpi6kq Qux17F6Q6sewYVlayiQBtsqe1qgtKRHx8ltcEc1GqwZ5r7sQ2AMtjU4wIGuGCV3fJnKr u77Bjlv/poUHBziiOOC8F/6QAy0ktzfECbHPcLfboNKAuTx1wBnfoOuIQmXACCVQGyud WgcFRP/pDkcMWUhwc40/XCm948hBw5ZfzyB8JA0av6Pm4fDCOzN5Mx45DMR9A3XkHXp1 jaQ3HDMW7al1jA4MY+RKAFphZKNAJVw7zgjfh51/kLtkj7DqNvGPOTORFDLeOQ78QpGK 2CSA== 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=DRRb/yywJsidR4CENTzlb34dfg4QN/Urf2lPX8v68vI=; b=Lfg9r5EMqLgg6J7IlUvHu8jI5xbp+h0Kb79NXKQ+IvyAitoGCfbG8GmPTg6hSa+7Uk jUR+PAozsZAJwJ0Vnq2Q1ldQL9oz+s5pobO/1Fo8JUtchBQBB2RiRycM/4C65+Xxie0J N18IAxhWdvogbXu1AnXbLBPS/Epy/e0Wl4XEYtwdr6qPgy3ItL+f9V1FU2Od6LetSEio eJLVIc+DQ/tHBa2AOwN3kSUSJnDEWcyTf1TUK9jHi7O88baNsRa/y0iFfrrpsHF5oOYL JozIzjY11KLDu/osBVXCCOrf9BW2ZNmzlMS1f3xqaR8RZK53zKxwU5SBSRDRNnnmQt5S WA0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a170902b20f00b001a67533ed1asi10248223plr.421.2023.04.16.20.05.13; Sun, 16 Apr 2023 20:05:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjDQDE1 (ORCPT + 99 others); Sun, 16 Apr 2023 23:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjDQDED (ORCPT ); Sun, 16 Apr 2023 23:04:03 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B393526BE; Sun, 16 Apr 2023 20:04:01 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Q0Bhr3g6Bz4f47kc; Mon, 17 Apr 2023 11:03:56 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgAXODIXtzxkfzJgHA--.17426S13; Mon, 17 Apr 2023 11:03:57 +0800 (CST) From: Kemeng Shi To: tytso@mit.edu, adilger.kernel@dilger.ca, ojaswin@linux.ibm.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH v3 11/19] ext4: fix wrong unit use in ext4_mb_new_blocks Date: Mon, 17 Apr 2023 19:06:09 +0800 Message-Id: <20230417110617.2664129-12-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230417110617.2664129-1-shikemeng@huaweicloud.com> References: <20230417110617.2664129-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgAXODIXtzxkfzJgHA--.17426S13 X-Coremail-Antispam: 1UD129KBjvdXoWrtF47ZFW7Cw18trW3WrWkXrb_yoW3Grg_GF 17ArW8Jr4rJwn5CF95JrW8t3WrKr18Ar1rXFW3tr45Za45XFZrCw1DJryrAr4DWa4aka9x Z3s5WryxKr1S9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbDAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AK xVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRvJPtU UUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=2.5 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, KHOP_HELO_FCRDNS,MAY_BE_FORGED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Function ext4_mb_new_blocks_simple needs count in cluster. Function ext4_mb_new_blocks accepts count in block. Convert count to cluster to fix the mismatch. Signed-off-by: Kemeng Shi --- fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 4a345e3c1c78..6d4471fd3049 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -6315,7 +6315,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, } if (sbi->s_mount_state & EXT4_FC_REPLAY) { - ext4_free_blocks_simple(inode, block, count); + ext4_free_blocks_simple(inode, block, EXT4_NUM_B2C(sbi, count)); return; } -- 2.30.0