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 X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BB57C2BA19 for ; Wed, 15 Apr 2020 12:04:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42CE2206A2 for ; Wed, 15 Apr 2020 12:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586952294; bh=SGnr2/e7GmT3wDXUemKbpVvtulIMmGz6dK/StJqhNwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=aUkC029A3H2N9jBZpbYO58WQYWGPrC0z2UpF9MtnYxfQJAxVV4rOVLborcxqiHBU4 k367Nccu9dUZlbkV05tx/7PnkM3HyMUwXr0DNlyFFqLyuaXLscMx4rYumql/7HVtD9 2Sn+D4biiwz1/S5mELaJ2tBLlDwh5SvRPJKiz2+s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S368328AbgDOMEt (ORCPT ); Wed, 15 Apr 2020 08:04:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:43626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409407AbgDOLr7 (ORCPT ); Wed, 15 Apr 2020 07:47:59 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A983E21569; Wed, 15 Apr 2020 11:47:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586951279; bh=SGnr2/e7GmT3wDXUemKbpVvtulIMmGz6dK/StJqhNwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UK+q22tQy73IRIuzdDDpMRS82uDlhqtxmbM2HjQwLUpDlga71vObj0QVcrchOZH43 4jk2Z5RGjK4bT1fFZ3+qMpPk7RFYX54+lMDE7D+qptRo2h+HfMYP1WPIPkcBFArmNr WOe8XwfBPjN4fUKQ6OYL38AeV6pdJzVt+WPE9OJw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Josh Triplett , Andreas Dilger , Theodore Ts'o , Sasha Levin , linux-ext4@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 09/21] ext4: fix incorrect inodes per group in error message Date: Wed, 15 Apr 2020 07:47:36 -0400 Message-Id: <20200415114748.15713-9-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200415114748.15713-1-sashal@kernel.org> References: <20200415114748.15713-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Josh Triplett [ Upstream commit b9c538da4e52a7b79dfcf4cfa487c46125066dfb ] If ext4_fill_super detects an invalid number of inodes per group, the resulting error message printed the number of blocks per group, rather than the number of inodes per group. Fix it to print the correct value. Fixes: cd6bb35bf7f6d ("ext4: use more strict checks for inodes_per_block on mount") Link: https://lore.kernel.org/r/8be03355983a08e5d4eed480944613454d7e2550.1585434649.git.josh@joshtriplett.org Reviewed-by: Andreas Dilger Signed-off-by: Josh Triplett Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index cbea8ff6e6c7b..ed0520fe4dad6 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3821,7 +3821,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) if (sbi->s_inodes_per_group < sbi->s_inodes_per_block || sbi->s_inodes_per_group > blocksize * 8) { ext4_msg(sb, KERN_ERR, "invalid inodes per group: %lu\n", - sbi->s_blocks_per_group); + sbi->s_inodes_per_group); goto failed_mount; } sbi->s_itb_per_group = sbi->s_inodes_per_group / -- 2.20.1