mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-12 01:14:22 -05:00
24 lines
892 B
Diff
24 lines
892 B
Diff
From 5063cbf9d49280ac925f86968ff60401b3071603 Mon Sep 17 00:00:00 2001
|
|
From: syphyr <syphyr@gmail.com>
|
|
Date: Sun, 11 Jun 2017 00:40:19 +0200
|
|
Subject: [PATCH] ext4: fix condition of validate s_first_meta_bg
|
|
|
|
Fixes: ext4: validate s_first_meta_bg at mount time
|
|
|
|
Change-Id: Iea0fb0df71502c5578c3c96e992d6cc78842ca7e
|
|
---
|
|
|
|
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
|
|
index 0aed818..04294d7 100644
|
|
--- a/fs/ext4/super.c
|
|
+++ b/fs/ext4/super.c
|
|
@@ -3804,7 +3804,7 @@
|
|
(EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb)));
|
|
db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
|
|
EXT4_DESC_PER_BLOCK(sb);
|
|
- if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
|
|
+ if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_META_BG)) {
|
|
if (le32_to_cpu(es->s_first_meta_bg) >= db_count) {
|
|
ext4_msg(sb, KERN_WARNING,
|
|
"first meta block group too large: %u "
|