aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2012-09-05 20:31:42 -0400
committerKent Overstreet <koverstreet@google.com>2013-03-23 17:15:31 -0400
commit2f477877f8c4be18f054aeb7c4be8cc748cfe932 (patch)
treeade275970fd1282cafc6d47753564c821020be8a /drivers/scsi/libsas
parent4f2ac93c175c4922bdddbfec6cad94b32cea0070 (diff)
block: Remove some unnecessary bi_vcnt usage
More prep work for immutable bvecs/effecient bio splitting - usage of bi_vcnt has to be auditing, so getting rid of all the unnecessary usage makes that easier. Plus, bio_segments() is really what this code wanted, as it respects the current value of bi_idx. Signed-off-by: Kent Overstreet <koverstreet@google.com> CC: Jens Axboe <axboe@kernel.dk> CC: Eric Moore <Eric.Moore@lsi.com> CC: "James E.J. Bottomley" <JBottomley@parallels.com> CC: linux-scsi@vger.kernel.org
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r--drivers/scsi/libsas/sas_expander.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index aec2e0da5016..7af776737b40 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -2151,10 +2151,10 @@ int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
2151 } 2151 }
2152 2152
2153 /* do we need to support multiple segments? */ 2153 /* do we need to support multiple segments? */
2154 if (req->bio->bi_vcnt > 1 || rsp->bio->bi_vcnt > 1) { 2154 if (bio_segments(req->bio) > 1 || bio_segments(rsp->bio) > 1) {
2155 printk("%s: multiple segments req %u %u, rsp %u %u\n", 2155 printk("%s: multiple segments req %u %u, rsp %u %u\n",
2156 __func__, req->bio->bi_vcnt, blk_rq_bytes(req), 2156 __func__, bio_segments(req->bio), blk_rq_bytes(req),
2157 rsp->bio->bi_vcnt, blk_rq_bytes(rsp)); 2157 bio_segments(rsp->bio), blk_rq_bytes(rsp));
2158 return -EINVAL; 2158 return -EINVAL;
2159 } 2159 }
2160 2160