1 ext4: fix fencepost in s_first_meta_bg validation
3 It is OK for s_first_meta_bg to be equal to the number of block group
4 descriptor blocks. (It rarely happens, but it shouldn't cause any
7 https://bugzilla.kernel.org/show_bug.cgi?id=194567
9 Fixes: 3a4b77cd47bb837b8557595ec7425f281f2ca1fe
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 Cc: stable@vger.kernel.org
12 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
13 index dde14a7ac6d7..a673558fe5f8 100644
16 @@ -3860,7 +3860,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
17 db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
18 EXT4_DESC_PER_BLOCK(sb);
19 if (ext4_has_feature_meta_bg(sb)) {
20 - if (le32_to_cpu(es->s_first_meta_bg) >= db_count) {
21 + if (le32_to_cpu(es->s_first_meta_bg) > db_count) {
22 ext4_msg(sb, KERN_WARNING,
23 "first meta block group too large: %u "
24 "(group descriptor block count %u)",