Commit 8615cb65 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mike Snitzer
Browse files

dm: remove useless loop in __split_and_process_bio



Remove useless "while" loop. If the condition ci.sector_count && !error is
true, we go to a branch that ends with "break". If this condition is
false, the "while" loop will not be executed again. So, the loop can't be
executed more than once.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent c40819f2
Loading
Loading
Loading
Loading
+29 −32
Original line number Diff line number Diff line
@@ -1641,7 +1641,6 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,
	} else {
		ci.bio = bio;
		ci.sector_count = bio_sectors(bio);
		while (ci.sector_count && !error) {
		error = __split_and_process_non_flush(&ci);
		if (ci.sector_count && !error) {
			/*
@@ -1671,8 +1670,6 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,
			bio_chain(b, bio);
			trace_block_split(b, bio->bi_iter.bi_sector);
			ret = submit_bio_noacct(bio);
				break;
			}
		}
	}