[RFC v2 01/17] xfs: don't clobber bi_status in xfs_zone_alloc_and_submit

Andreas Gruenbacher <[email protected]>
Newsgroups gmane.linux.kernel.device-mapper.devel,gmane.linux.block,gmane.comp.file-systems.btrfs,gmane.linux.raid,gmane.linux.kernel
Message-ID <[email protected]>
Function xfs_zone_alloc_and_submit() sets bio->bi_status and then it
calls bio_io_error(), which overwrites that value again.  Fix that by
completing the bio separately after setting bio->bi_status.

Signed-off-by: Andreas Gruenbacher <[email protected]>
---
 fs/xfs/xfs_zone_alloc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c
index ef7a931ebde5..bd6f3ef095cb 100644
--- a/fs/xfs/xfs_zone_alloc.c
+++ b/fs/xfs/xfs_zone_alloc.c
@@ -897,6 +897,9 @@ xfs_zone_alloc_and_submit(
 
 out_split_error:
 	ioend->io_bio.bi_status = errno_to_blk_status(PTR_ERR(split));
+	bio_endio(&ioend->io_bio);
+	return;
+
 out_error:
 	bio_io_error(&ioend->io_bio);
 }
-- 
2.52.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.