From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09D83C0015E for ; Fri, 21 Jul 2023 19:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232143AbjGUTV1 (ORCPT ); Fri, 21 Jul 2023 15:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232142AbjGUTV0 (ORCPT ); Fri, 21 Jul 2023 15:21:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824CC30E1 for ; Fri, 21 Jul 2023 12:21:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 21FEB61D5F for ; Fri, 21 Jul 2023 19:21:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30DF0C433C7; Fri, 21 Jul 2023 19:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689967275; bh=WJY+zMHRBFtW8hOPP4ihXMDxOeFqUXZ3rJVrFbrELzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nrwp2qG31UBQsVTgZ1+DfXoJraAKWK9GCYWZ/y4/btF+4ofIraMgzCt+9C8sWNKFo n+fIBeQREMd7QRbPCGGJY6bA9mD3BiGPbYycz4/uNaJ7wgdlcr0/rxpw8lbOGWbidl GJPbBKoMj/+0J9cqgUnf32Ahn3AbtZVe+yvT3ctg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kemeng Shi , stable@kernel.org, Ojaswin Mujoo , Theodore Tso Subject: [PATCH 6.1 105/223] ext4: fix wrong unit use in ext4_mb_clear_bb Date: Fri, 21 Jul 2023 18:05:58 +0200 Message-ID: <20230721160525.347399124@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721160520.865493356@linuxfoundation.org> References: <20230721160520.865493356@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kemeng Shi commit 247c3d214c23dfeeeb892e91a82ac1188bdaec9f upstream. Function ext4_issue_discard need count in cluster. Pass count_clusters instead of count to fix the mismatch. Signed-off-by: Kemeng Shi Cc: stable@kernel.org Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230603150327.3596033-11-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- fs/ext4/mballoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -6073,8 +6073,8 @@ do_more: * them with group lock_held */ if (test_opt(sb, DISCARD)) { - err = ext4_issue_discard(sb, block_group, bit, count, - NULL); + err = ext4_issue_discard(sb, block_group, bit, + count_clusters, NULL); if (err && err != -EOPNOTSUPP) ext4_msg(sb, KERN_WARNING, "discard request in" " group:%u block:%d count:%lu failed"