summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bio_io.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-07-09 17:58:28 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2019-07-10 19:04:16 +0200
commit488ca3d8d088ec4658c87aaec6a91e98acccdd54 (patch)
treeb0703c84217d461f235f1658c4711852c81cb05c /fs/xfs/xfs_bio_io.c
parentxfs: bump INUMBERS cursor correctly in xfs_inumbers_walk (diff)
downloadlinux-488ca3d8d088ec4658c87aaec6a91e98acccdd54.tar.xz
linux-488ca3d8d088ec4658c87aaec6a91e98acccdd54.zip
xfs: chain bios the right way around in xfs_rw_bdev
We need to chain the earlier bios to the later ones, so that submit_bio_wait waits on the bio that all the completions are dispatched to. Fixes: 6ad5b3255b9e ("xfs: use bios directly to read and write the log recovery buffers") Reported-by: Dave Chinner <david@fromorbit.com> Tested-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_bio_io.c')
-rw-r--r--fs/xfs/xfs_bio_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_bio_io.c b/fs/xfs/xfs_bio_io.c
index 757c1d9293eb..e2148f2d5d6b 100644
--- a/fs/xfs/xfs_bio_io.c
+++ b/fs/xfs/xfs_bio_io.c
@@ -43,7 +43,7 @@ xfs_rw_bdev(
bio_copy_dev(bio, prev);
bio->bi_iter.bi_sector = bio_end_sector(prev);
bio->bi_opf = prev->bi_opf;
- bio_chain(bio, prev);
+ bio_chain(prev, bio);
submit_bio(prev);
}