]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: fix incorrect error return ret being passed to mapping_set_error
authorColin Ian King <colin.king@canonical.com>
Tue, 9 May 2017 17:14:01 +0000 (18:14 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:24 +0000 (21:36 -0400)
commitd865901b103b79b6976418ee62ebe8403fc0b624
tree301c2ca77b2ed8a0956034eb213d19b7409b3b68
parentb68364e2f2d6139b0bbe827c5dca79d80bfb57cf
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>
fs/btrfs/extent_io.c