summaryrefslogtreecommitdiff
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2018-08-09 16:04:22 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2018-08-09 16:04:22 +0200
commita5fc66599b6143999290603a51da11868f7d36a9 (patch)
treedd102e055095dc7f88433d342f0cad2b702c7cf4 /fs/ext4/super.c
parent139622602304abdded7433a218d8a499822c7c19 (diff)
parent8404ae6c8c9ff23a06cf38112e83002e1088bfe1 (diff)
Merge 4.4.147 into android-4.4
Changes in 4.4.147 scsi: qla2xxx: Fix ISP recovery on unload scsi: qla2xxx: Return error when TMF returns genirq: Make force irq threading setup more robust nohz: Fix local_timer_softirq_pending() netlink: Do not subscribe to non-existent groups netlink: Don't shift with UB on nlk->ngroups netlink: Don't shift on 64 for ngroups ext4: fix false negatives *and* false positives in ext4_check_descriptors() ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle ring_buffer: tracing: Inherit the tracing setting to next ring buffer i2c: imx: Fix reinit_completion() use jfs: Fix inconsistency between memory allocation and ea_buf->max_size Linux 4.4.147 Change-Id: I067f9844278976dddef8063961a70e189c423de3 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c5ba22bdeaa9..a26b71d04ab1 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2101,7 +2101,7 @@ static int ext4_check_descriptors(struct super_block *sb,
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block);
ext4_fsblk_t last_block;
- ext4_fsblk_t last_bg_block = sb_block + ext4_bg_num_gdb(sb, 0) + 1;
+ ext4_fsblk_t last_bg_block = sb_block + ext4_bg_num_gdb(sb, 0);
ext4_fsblk_t block_bitmap;
ext4_fsblk_t inode_bitmap;
ext4_fsblk_t inode_table;
@@ -3776,13 +3776,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
goto failed_mount2;
}
}
+ sbi->s_gdb_count = db_count;
if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
ret = -EFSCORRUPTED;
goto failed_mount2;
}
- sbi->s_gdb_count = db_count;
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);