|
@@ -890,6 +890,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
|
|
|
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 scatterlist *sgl, u32 sgl_nents,
|
|
|
* be allocated with pscsi_get_bio() above.
|
|
|
*/
|
|
|
bio = NULL;
|
|
|
+ goto new_bio;
|
|
|
}
|
|
|
|
|
|
data_len -= bytes;
|