diff options
-rw-r--r-- | fs/ext4/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index f06d0589ddba..ca9d4a2fed41 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -294,6 +294,8 @@ static void __save_error_info(struct super_block *sb, const char *func, | |||
294 | struct ext4_super_block *es = EXT4_SB(sb)->s_es; | 294 | struct ext4_super_block *es = EXT4_SB(sb)->s_es; |
295 | 295 | ||
296 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; | 296 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; |
297 | if (bdev_read_only(sb->s_bdev)) | ||
298 | return; | ||
297 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); | 299 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); |
298 | es->s_last_error_time = cpu_to_le32(get_seconds()); | 300 | es->s_last_error_time = cpu_to_le32(get_seconds()); |
299 | strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func)); | 301 | strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func)); |