Skip to content

Commit f007dbf

Browse files
Eric Sandeenjankara
authored andcommitted
ext3: force ro mount if ext3_setup_super() fails
If ext3_setup_super() fails i.e. due to a too-high revision, the error is logged in dmesg but the fs is not mounted RO as indicated. Tested by: [164152.114551] EXT3-fs (sdb6): error: revision level too high, forcing read-only mode /dev/sdb6 /mnt/test2 ext3 rw,seclabel,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0 ^^ Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent f3da931 commit f007dbf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎fs/ext3/super.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
20582058
goto failed_mount3;
20592059
}
20602060

2061-
ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
2061+
if (ext3_setup_super(sb, es, sb->s_flags & MS_RDONLY))
2062+
sb->s_flags |= MS_RDONLY;
20622063

20632064
EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS;
20642065
ext3_orphan_cleanup(sb, es);

0 commit comments

Comments
 (0)