summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-17 00:16:41 +0400
committerMark Brown <broonie@linaro.org>2013-10-17 00:16:41 +0400
commit381bd9517a7e611871694689c67901d189cf6a62 (patch)
tree7f9492cbbb93039ef84722e518e2ca6e8ad0c364 /include/linux/blkdev.h
parent01b9e0418689951c6ae4ba3b221bc42f49eb6407 (diff)
parentf6bd03a746271f298aa5bfb6e049b245757efaed (diff)
downloadlinux-381bd9517a7e611871694689c67901d189cf6a62.tar.xz
Merge remote-tracking branch 'spi/topic/trivial' into spi-atmel
Conflicts (trivial overlapping cleanups): drivers/spi/spi-atmel.c
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2fdb4a451b49..0e6f765aa1f5 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -862,6 +862,17 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq)
return blk_queue_get_max_sectors(q, rq->cmd_flags);
}
+static inline unsigned int blk_rq_count_bios(struct request *rq)
+{
+ unsigned int nr_bios = 0;
+ struct bio *bio;
+
+ __rq_for_each_bio(bio, rq)
+ nr_bios++;
+
+ return nr_bios;
+}
+
/*
* Request issue related functions.
*/