Colin Ian King e09fd7c644 btrfs: fix incorrect error return ret being passed to mapping_set_error
[ Upstream commit bff5baf8aa37a97293725a16c03f49872249c07e ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-13 19:47:58 +02:00
..
2016-10-15 12:09:13 -07:00
2018-04-13 19:47:55 +02:00
2017-08-06 18:59:43 -07:00
2016-05-20 17:58:30 -07:00
2017-11-30 08:39:04 +00:00
2018-04-13 19:47:53 +02:00
2017-08-06 18:59:43 -07:00
2017-06-14 15:06:00 +02:00
2016-09-27 21:20:53 -04:00
2016-09-27 18:47:38 -04:00
2016-06-21 09:23:11 +10:00
2018-02-17 13:21:15 +01:00
2017-06-14 15:06:01 +02:00