linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Josh Triplett <josh@joshtriplett.org>,
	Andreas Dilger <adilger@dilger.ca>, Theodore Ts'o <tytso@mit.edu>,
	Sasha Levin <sashal@kernel.org>,
	linux-ext4@vger.kernel.org
Subject: [PATCH AUTOSEL 4.4 06/14] ext4: fix incorrect inodes per group in error message
Date: Wed, 15 Apr 2020 07:48:06 -0400	[thread overview]
Message-ID: <20200415114814.15954-6-sashal@kernel.org> (raw)
In-Reply-To: <20200415114814.15954-1-sashal@kernel.org>

From: Josh Triplett <josh@joshtriplett.org>

[ 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 <adilger@dilger.ca>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 d8b2d38d2942e..67faf147bade1 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3661,7 +3661,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


  parent reply	other threads:[~2020-04-15 12:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 11:48 [PATCH AUTOSEL 4.4 01/14] clk: at91: usb: continue if clk_hw_round_rate() return zero Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 02/14] clk: tegra: Fix Tegra PMC clock out parents Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 03/14] NFS: direct.c: Fix memory leak of dreq when nfs_get_lock_context fails Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 04/14] ext4: do not commit super on read-only bdev Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 05/14] ext4: fix incorrect group count in ext4_fill_super error message Sasha Levin
2020-04-15 11:48 ` Sasha Levin [this message]
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 07/14] slcan: Don't transmit uninitialized stack data in padding Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 08/14] net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 09/14] percpu_counter: fix a data race at vm_committed_as Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 10/14] compiler.h: fix error in BUILD_BUG_ON() reporting Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 11/14] NFS: Fix memory leaks in nfs_pageio_stop_mirroring() Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 12/14] mfd: dln2: Fix sanity checking for endpoints Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 13/14] ext2: fix empty body warnings when -Wextra is used Sasha Levin
2020-04-15 11:48 ` [PATCH AUTOSEL 4.4 14/14] iommu/amd: Fix the configuration of GCR3 table root pointer Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200415114814.15954-6-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=adilger@dilger.ca \
    --cc=josh@joshtriplett.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).