diff options
-rw-r--r-- | fs/ext4/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 8f4f079e6b9a..fe3f376b7df2 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -344,7 +344,8 @@ static const char *ext4_decode_error(struct super_block *sb, int errno, | |||
344 | errstr = "Out of memory"; | 344 | errstr = "Out of memory"; |
345 | break; | 345 | break; |
346 | case -EROFS: | 346 | case -EROFS: |
347 | if (!sb || EXT4_SB(sb)->s_journal->j_flags & JBD2_ABORT) | 347 | if (!sb || (EXT4_SB(sb)->s_journal && |
348 | EXT4_SB(sb)->s_journal->j_flags & JBD2_ABORT)) | ||
348 | errstr = "Journal has aborted"; | 349 | errstr = "Journal has aborted"; |
349 | else | 350 | else |
350 | errstr = "Readonly filesystem"; | 351 | errstr = "Readonly filesystem"; |