Skip to contentSkip to conversation

xfs: chain bios the right way around in xfs_rw_bdev

PATCH In review Christoph Hellwig 3 participants 3 messages Jul 9, 2019 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 fs/xfs/xfs_bio_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_bio_io.c +1 -1
index 757c1d9293eb..e2148f2d5d6b 100644
@@ -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);
 		}
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Christoph Hellwig

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")

Looks ok to me; anyone else want to add a tested-by?

--D

Quoted 20 lines
---
 fs/xfs/xfs_bio_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_bio_io.c +1 -1
index 757c1d9293eb..e2148f2d5d6b 100644
@@ -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);
 		}
Signature · 1 line
2.20.1