Jeff Layton 485e9605c0 fs/buffer.c: record blockdev write errors in super_block that it backs
When syncing out a block device (a'la __sync_blockdev), any error
encountered will only be recorded in the bd_inode's mapping.  When the
blockdev contains a filesystem however, we'd like to also record the
error in the super_block that's stored there.

Make mark_buffer_write_io_error also record the error in the
corresponding super_block when a writeback error occurs and the block
device contains a mounted superblock.

Since superblocks are RCU freed, hold the rcu_read_lock to ensure that
the superblock doesn't go away while we're marking it.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andres Freund <andres@anarazel.de>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>
Link: http://lkml.kernel.org/r/20200428135155.19223-3-jlayton@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-02 10:59:05 -07:00
..
2020-03-27 09:29:56 +00:00
2019-09-19 09:42:37 -07:00
2020-06-01 12:10:17 -07:00
2019-11-11 09:21:59 -05:00
2020-06-01 12:10:17 -07:00
2020-06-01 12:10:17 -07:00
2020-02-13 09:16:07 +01:00
2019-09-19 09:42:37 -07:00
2020-02-05 05:28:20 +00:00
\n
2020-01-30 15:37:41 -08:00
2020-04-10 15:36:22 -07:00
2019-09-19 09:42:37 -07:00
2020-04-21 09:51:10 -06:00
2019-08-07 21:51:47 -04:00
2020-02-07 14:48:35 -05:00
2020-02-07 14:48:35 -05:00
2020-03-06 11:06:15 +01:00
2020-03-05 21:00:40 -05:00
2020-03-05 21:00:40 -05:00
2020-04-06 10:38:59 -04:00
2020-03-12 17:33:11 -07:00
2019-12-08 14:37:36 +01:00
2020-04-28 14:37:40 -07:00
2020-04-09 15:33:09 -04:00