All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg()
@ 2020-12-23  5:43 Hui Su
  2020-12-26 11:31   ` kernel test robot
  0 siblings, 1 reply; 5+ messages in thread
From: Hui Su @ 2020-12-23  5:43 UTC (permalink / raw)
  To: axboe, linux-block, linux-kernel; +Cc: sh_def, songmuchun

remove the next_bvec label in __blk_bios_map_sg(),
simplify the logic of traversal bvec.

Signed-off-by: Hui Su <sh_def@163.com>
---
 block/blk-merge.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 808768f6b174..aa113cbc0f35 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -494,15 +494,15 @@ static int __blk_bios_map_sg(struct request_queue *q, struct bio *bio,
 			 * to bio
 			 */
 			if (new_bio &&
-			    __blk_segment_map_sg_merge(q, &bvec, &bvprv, sg))
-				goto next_bvec;
+			    __blk_segment_map_sg_merge(q, &bvec, &bvprv, sg)) {
+				new_bio = false;
+				continue;
+			}
 
 			if (bvec.bv_offset + bvec.bv_len <= PAGE_SIZE)
 				nsegs += __blk_bvec_map_sg(bvec, sglist, sg);
 			else
 				nsegs += blk_bvec_map_sg(q, &bvec, sglist, sg);
- next_bvec:
-			new_bio = false;
 		}
 		if (likely(bio->bi_iter.bi_size)) {
 			bvprv = bvec;
-- 
2.25.1



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

end of thread, other threads:[~2020-12-28 15:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23  5:43 [PATCH v2] blokc/blk-merge: remove the next_bvec label in __blk_bios_map_sg() Hui Su
2020-12-26 11:31 ` [blokc/blk] d828aefa7a: xfstests.xfs.372.fail kernel test robot
2020-12-26 11:31   ` kernel test robot
2020-12-28 15:25   ` Hui Su
2020-12-28 15:25     ` Hui Su

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.