diff options
author | Qu Wenruo <wqu@suse.com> | 2025-09-18 02:10:45 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-09-23 09:49:23 +0300 |
commit | 2d83ed6c6c4607b42ee7927e92a9d2fa31d6f30b (patch) | |
tree | f47ee5c401d6a4551f60725daf1d0d9f883ee5d6 /fs/btrfs/tree-log.c | |
parent | 5afe85b771eefe91891cca332cb916f8da6d48e1 (diff) | |
download | linux-2d83ed6c6c4607b42ee7927e92a9d2fa31d6f30b.tar.xz |
btrfs: return any hit error from extent_writepage_io()
Since the support of bs < ps support, extent_writepage_io() will submit
multiple blocks inside the folio.
But if we hit error submitting one sector, but the next sector can still
be submitted successfully, the function extent_writepage_io() will still
return 0.
This will make btrfs to silently ignore the error without setting error
flag for the filemap.
Fix it by recording the first error hit, and always return that value.
Fixes: 8bf334beb349 ("btrfs: fix double accounting race when extent_writepage_io() failed")
Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
0 files changed, 0 insertions, 0 deletions