* [PATCH] ext4: don't save the error information if the block device is read-only
@ 2015-05-14 22:37 Theodore Ts'o
[not found] ` <CAG_9a6cSd-1VDD8zkCt7zFPbBi01a78VeOTDyi0NJuvS26XApw@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2015-05-14 22:37 UTC (permalink / raw)
To: Ext4 Developers List; +Cc: mkayyash, Theodore Ts'o
Google-Bug-Id: 20939131
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
fs/ext4/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f06d058..ca9d4a2 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,
struct ext4_super_block *es = EXT4_SB(sb)->s_es;
EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
+ if (bdev_read_only(sb->s_bdev))
+ return;
es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
es->s_last_error_time = cpu_to_le32(get_seconds());
strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func));
--
2.3.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-15 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-14 22:37 [PATCH] ext4: don't save the error information if the block device is read-only Theodore Ts'o
[not found] ` <CAG_9a6cSd-1VDD8zkCt7zFPbBi01a78VeOTDyi0NJuvS26XApw@mail.gmail.com>
2015-05-15 23:36 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).