mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
btrfs: fix incorrect error return ret being passed to mapping_set_error
[ Upstream commitbff5baf8aa] The setting of return code ret should be based on the error code passed into function end_extent_writepage and not on ret. Thanks to Liu Bo for spotting this mistake in the original fix I submitted. Detected by CoverityScan, CID#1414312 ("Logically dead code") Fixes:5dca6eea91("Btrfs: mark mapping with error flag to report errors to userspace") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
413d35ed7e
commit
ef51fe4d40
|
|
@ -2534,7 +2534,7 @@ int end_extent_writepage(struct page *page, int err, u64 start, u64 end)
|
|||
if (!uptodate) {
|
||||
ClearPageUptodate(page);
|
||||
SetPageError(page);
|
||||
ret = ret < 0 ? ret : -EIO;
|
||||
ret = err < 0 ? err : -EIO;
|
||||
mapping_set_error(page->mapping, ret);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user