Commit f007dbf8e51f4a0910194eebc2aa119eb861893e
Committed by
Jan Kara
1 parent
f3da93105b
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
fs/ext3/super.c
... | ... | @@ -2058,7 +2058,8 @@ |
2058 | 2058 | goto failed_mount3; |
2059 | 2059 | } |
2060 | 2060 | |
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; | |
2062 | 2063 | |
2063 | 2064 | EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS; |
2064 | 2065 | ext3_orphan_cleanup(sb, es); |