summaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2012-09-05 17:31:42 -0700
committerKent Overstreet <koverstreet@google.com>2013-03-23 14:15:31 -0700
commit2f477877f8c4be18f054aeb7c4be8cc748cfe932 (patch)
treeade275970fd1282cafc6d47753564c821020be8a /drivers/message
parent4f2ac93c175c4922bdddbfec6cad94b32cea0070 (diff)
downloadlinux-stable-2f477877f8c4be18f054aeb7c4be8cc748cfe932.tar.gz
linux-stable-2f477877f8c4be18f054aeb7c4be8cc748cfe932.tar.bz2
linux-stable-2f477877f8c4be18f054aeb7c4be8cc748cfe932.zip
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/message')
-rw-r--r--drivers/message/fusion/mptsas.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index fa43c391c8ed..2bb01546df0b 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -2235,10 +2235,10 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
}
/* do we need to support multiple segments? */
- if (req->bio->bi_vcnt > 1 || rsp->bio->bi_vcnt > 1) {
+ if (bio_segments(req->bio) > 1 || bio_segments(rsp->bio) > 1) {
printk(MYIOC_s_ERR_FMT "%s: multiple segments req %u %u, rsp %u %u\n",
- ioc->name, __func__, req->bio->bi_vcnt, blk_rq_bytes(req),
- rsp->bio->bi_vcnt, blk_rq_bytes(rsp));
+ ioc->name, __func__, bio_segments(req->bio), blk_rq_bytes(req),
+ bio_segments(rsp->bio), blk_rq_bytes(rsp));
return -EINVAL;
}