Files
linux/fs/ext4
Theodore Ts'o 2ad8eb8646 ext4: avoid kernel warning when writing the superblock to a dead device
commit e86807862e upstream.

The xfstests generic/475 test switches the underlying device with
dm-error while running a stress test.  This results in a large number
of file system errors, and since we can't lock the buffer head when
marking the superblock dirty in the ext4_grp_locked_error() case, it's
possible the superblock to be !buffer_uptodate() without
buffer_write_io_error() being true.

We need to set buffer_uptodate() before we call mark_buffer_dirty() or
this will trigger a WARN_ON.  It's safe to do this since the
superblock must have been properly read into memory or the mount would
have been successful.  So if buffer_uptodate() is not set, we can
safely assume that this happened due to a failed attempt to write the
superblock.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-15 11:01:04 +09:00
..
2015-04-02 23:47:42 -04:00
2016-09-05 23:21:43 -04:00
2015-04-02 23:47:42 -04:00
2016-03-09 23:49:05 -05:00
2023-05-15 08:25:24 +09:00
2017-10-13 11:27:08 +00:00
2023-05-15 10:49:36 +09:00
2018-04-12 09:54:41 -07:00