Message ID | 20180618080611.038102648@linuxfoundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -890,6 +890,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct bytes = min(bytes, data_len); if (!bio) { +new_bio: nr_vecs = min_t(int, BIO_MAX_PAGES, nr_pages); nr_pages -= nr_vecs; /* @@ -931,6 +932,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct * be allocated with pscsi_get_bio() above. */ bio = NULL; + goto new_bio; } data_len -= bytes;