summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-05-09 18:14:01 +0100
committerDavid Sterba <dsterba@suse.com>2017-05-16 15:42:10 +0200
commitbff5baf8aa37a97293725a16c03f49872249c07e (patch)
tree5e2f4bfcdd8c94f2c2730d735e3324849ec70068 /fs
parent8d91012528b3c95c159e6b6779e367421df9cbb5 (diff)
downloadop-kernel-dev-bff5baf8aa37a97293725a16c03f49872249c07e.zip
op-kernel-dev-bff5baf8aa37a97293725a16c03f49872249c07e.tar.gz
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: 5dca6eea91653e ("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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 4317ed3..d3619e0 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -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);
}
}
OpenPOWER on IntegriCloud