diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2012-09-27 06:45:28 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-09-27 06:45:28 -0400 |
commit | 2e484610296b25f0a04b516bc144a00731d1d845 (patch) | |
tree | d45467ec0b7c2446652e685b270427183471a5ad /include/linux/scatterlist.h | |
parent | c2b1ad800b66f62105a7fd250604d72e07202e66 (diff) |
scatterlist: add sg_nents
Useful helper to know the number of entries in scatterlist.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/scatterlist.h')
-rw-r--r-- | include/linux/scatterlist.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 7b600da9a635..4bd6c06eb28e 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -201,6 +201,7 @@ static inline void *sg_virt(struct scatterlist *sg) | |||
201 | return page_address(sg_page(sg)) + sg->offset; | 201 | return page_address(sg_page(sg)) + sg->offset; |
202 | } | 202 | } |
203 | 203 | ||
204 | int sg_nents(struct scatterlist *sg); | ||
204 | struct scatterlist *sg_next(struct scatterlist *); | 205 | struct scatterlist *sg_next(struct scatterlist *); |
205 | struct scatterlist *sg_last(struct scatterlist *s, unsigned int); | 206 | struct scatterlist *sg_last(struct scatterlist *s, unsigned int); |
206 | void sg_init_table(struct scatterlist *, unsigned int); | 207 | void sg_init_table(struct scatterlist *, unsigned int); |