All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: fix bio chaining in blk_next_bio()
@ 2020-12-06  5:18 Tom Yan
  2020-12-06 11:20 ` Hannes Reinecke
  2020-12-07  3:12 ` Ming Lei
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Yan @ 2020-12-06  5:18 UTC (permalink / raw)
  To: linux-block, hch, ming.l, sagig, axboe; +Cc: tom.leiming, Tom Yan

While it seems to have worked for so long, it doesn't seem right
that we set the new bio as the parent. bio_chain() seems to be used
in the other way everywhere else anyway.

Signed-off-by: Tom Yan <tom.ty89@gmail.com>
---
 block/blk-lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index e90614fd8d6a..918deaf5c8a4 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -15,7 +15,7 @@ struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp)
 	struct bio *new = bio_alloc(gfp, nr_pages);
 
 	if (bio) {
-		bio_chain(bio, new);
+		bio_chain(new, bio);
 		submit_bio(bio);
 	}
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-09  1:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06  5:18 [PATCH] block: fix bio chaining in blk_next_bio() Tom Yan
2020-12-06 11:20 ` Hannes Reinecke
2020-12-06 13:17   ` Tom Yan
2020-12-06 14:17     ` Tom Yan
2020-12-07  3:12 ` Ming Lei
2020-12-08 12:46   ` Tom Yan
2020-12-09  1:20     ` Ming Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.