mirror of https://gitee.com/openkylin/linux.git
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: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
c40819f267
commit
8615cb65bd
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue