Commit 2dbe10a2 authored by Asias He's avatar Asias He Committed by Nicholas Bellinger

target/pscsi: Rename sg_num to nr_vecs in pscsi_get_bio()

It is actually a vector not a sg, so nr_vecs is better than sg_num.
Signed-off-by: default avatarAsias He <asias@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 472b72f2
...@@ -840,14 +840,14 @@ static void pscsi_bi_endio(struct bio *bio, int error) ...@@ -840,14 +840,14 @@ static void pscsi_bi_endio(struct bio *bio, int error)
bio_put(bio); bio_put(bio);
} }
static inline struct bio *pscsi_get_bio(int sg_num) static inline struct bio *pscsi_get_bio(int nr_vecs)
{ {
struct bio *bio; struct bio *bio;
/* /*
* Use bio_malloc() following the comment in for bio -> struct request * Use bio_malloc() following the comment in for bio -> struct request
* in block/blk-core.c:blk_make_request() * in block/blk-core.c:blk_make_request()
*/ */
bio = bio_kmalloc(GFP_KERNEL, sg_num); bio = bio_kmalloc(GFP_KERNEL, nr_vecs);
if (!bio) { if (!bio) {
pr_err("PSCSI: bio_kmalloc() failed\n"); pr_err("PSCSI: bio_kmalloc() failed\n");
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment