diff options
-rw-r--r-- | fs/ext4/super.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 7bef0a4bc518..a53a23aef5e3 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -2177,10 +2177,12 @@ static void ext4_orphan_cleanup(struct super_block *sb, | |||
2177 | } | 2177 | } |
2178 | 2178 | ||
2179 | if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { | 2179 | if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { |
2180 | if (es->s_last_orphan) | 2180 | /* don't clear list on RO mount w/ errors */ |
2181 | if (es->s_last_orphan && !(s_flags & MS_RDONLY)) { | ||
2181 | jbd_debug(1, "Errors on filesystem, " | 2182 | jbd_debug(1, "Errors on filesystem, " |
2182 | "clearing orphan list.\n"); | 2183 | "clearing orphan list.\n"); |
2183 | es->s_last_orphan = 0; | 2184 | es->s_last_orphan = 0; |
2185 | } | ||
2184 | jbd_debug(1, "Skipping orphan recovery on fs with errors.\n"); | 2186 | jbd_debug(1, "Skipping orphan recovery on fs with errors.\n"); |
2185 | return; | 2187 | return; |
2186 | } | 2188 | } |