mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
btrfs: fix incorrect error return ret being passed to mapping_set_error
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 <[email protected]>
Reviewed-by: Liu Bo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
This commit is contained in:
parent
8d91012528
commit
bff5baf8aa
1 changed files with 1 additions and 1 deletions
|
|
@ -2458,7 +2458,7 @@ void 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue