Files
linux/fs
Filipe Manana 5be8e1ca39 Btrfs: fix missing error return if writeback for extent buffer never started
[ Upstream commit 0607eb1d45 ]

If lock_extent_buffer_for_io() fails, it returns a negative value, but its
caller btree_write_cache_pages() ignores such error. This means that a
call to flush_write_bio(), from lock_extent_buffer_for_io(), might have
failed. We should make btree_write_cache_pages() notice such error values
and stop immediatelly, making sure filemap_fdatawrite_range() returns an
error to the transaction commit path. A failure from flush_write_bio()
should also result in the endio callback end_bio_extent_buffer_writepage()
being invoked, which sets the BTRFS_FS_*_ERR bits appropriately, so that
there's no risk a transaction or log commit doesn't catch a writeback
failure.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-16 09:47:04 +09:00
..
2023-05-16 09:45:39 +09:00
2023-05-15 16:47:08 +09:00
2023-05-16 09:37:27 +09:00
2023-05-15 14:09:19 +09:00
2023-05-16 09:39:44 +09:00
2016-05-20 17:58:30 -07:00
2023-05-16 08:48:08 +09:00
2023-05-16 09:46:32 +09:00
2017-11-30 08:39:04 +00:00
2023-05-16 08:54:54 +09:00
2023-05-15 11:49:44 +09:00
2023-05-15 10:36:26 +09:00
2016-09-27 21:20:53 -04:00
2017-07-05 16:18:14 +02:00
2023-05-15 17:11:10 +09:00
2017-09-20 09:59:51 +02:00
2017-09-26 00:32:37 -07:00
2017-09-26 00:32:37 -07:00
2018-02-17 13:21:15 +01:00
2017-06-14 15:06:01 +02:00