Commit 5a8f271f authored by Baokun Li's avatar Baokun Li Committed by Yongqiang Liu
Browse files

ext4: fix bad checksum after online resize

hulk inclusion
category: bugfix
bugzilla: 187935,https://gitee.com/src-openeuler/kernel/issues/I5ZR8Z


CVE: NA

--------------------------------

When online resizing is performed twice consecutively, the error message
"Superblock checksum does not match superblock" is displayed for the
second time. Here's the reproducer:

	mkfs.ext4 -F /dev/sdb 100M
	mount /dev/sdb /tmp/test
	resize2fs /dev/sdb 5G
	resize2fs /dev/sdb 6G

To solve this issue, we moved the update of the checksum after the
es->s_overhead_clusters is updated.

Fixes: 026d0d27 ("ext4: reduce computation of overhead during resize")
Fixes: de394a86 ("ext4: update s_overhead_clusters in the superblock during an on-line resize")
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent d7514ed3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment