From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B2AB1ED4F for ; Tue, 25 Jul 2023 11:45:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AFEAC433C8; Tue, 25 Jul 2023 11:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1690285529; bh=QkIqMIBEK7cTRusjKc90W8ziCU5SwXP1/s/tEYTI1I8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZANQ5x9d+Gvq93bp9otWGj872LxAVoOko7x+zjRjg6igaIEiTC6hrjGDQNHMlzLjV UNEp1BGVs9ENA9/AB4hjWTBz6fxJy36oEn4S3Gb2PkctgU6hPKeD33Jkae1IrXX+l9 95p4UlSwd4EtkBhof2WMlVLWEDvuECM+1eETNTE0= 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 5.4 237/313] ext4: fix wrong unit use in ext4_mb_clear_bb Date: Tue, 25 Jul 2023 12:46:30 +0200 Message-ID: <20230725104531.302061284@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725104521.167250627@linuxfoundation.org> References: <20230725104521.167250627@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 @@ -4950,8 +4950,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:%d block:%d count:%lu failed"