Commit 21eaef8f authored by Baokun Li's avatar Baokun Li
Browse files

Revert "ext4: drop read-only check in ext4_init_inode_table()"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBEQJ3



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

This reverts commit ffb6844e.

We are about to revert 95257987 ("ext4: drop EXT4_MF_FS_ABORTED flag"),
therefore the changes to the sb_rdonly check are being reverted here.

Fixes: ffb6844e ("ext4: drop read-only check in ext4_init_inode_table()")
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
parent 3c3a8583
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1533,6 +1533,12 @@ int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,
	int num, ret = 0, used_blks = 0;
	unsigned long used_inos = 0;

	/* This should not happen, but just to be sure check this */
	if (sb_rdonly(sb)) {
		ret = 1;
		goto out;
	}

	gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
	if (!gdp || !grp)
		goto out;