summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2023-06-16 18:50:54 +0200
committerTheodore Ts'o <tytso@mit.edu>2023-07-29 18:37:53 -0400
commitffb6844e28ef6b9d76bee378774d7afbc3db6da9 (patch)
tree63cbe3b3a83c5ce1c154995b9a95432481bd6a1e /fs/ext4/ialloc.c
parente7fc2b31e04c46c9e2098bba710c9951c6b968af (diff)
downloadlinux-ffb6844e28ef6b9d76bee378774d7afbc3db6da9.tar.gz
linux-ffb6844e28ef6b9d76bee378774d7afbc3db6da9.tar.bz2
linux-ffb6844e28ef6b9d76bee378774d7afbc3db6da9.zip
ext4: drop read-only check in ext4_init_inode_table()
We better should not be initializing inode tables on read-only filesystem. The following transaction start will warn us and make the function bail anyway so drop the pointless check. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230616165109.21695-8-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 060630c0b0ca..e0698f54e17a 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1523,12 +1523,6 @@ 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;