aboutsummaryrefslogtreecommitdiffstats
path: root/mm/iov_iter.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/iov_iter.c')
-rw-r--r--mm/iov_iter.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/mm/iov_iter.c b/mm/iov_iter.c
index a1599ca4ab0e..827732047da1 100644
--- a/mm/iov_iter.c
+++ b/mm/iov_iter.c
@@ -501,18 +501,31 @@ size_t iov_iter_single_seg_count(const struct iov_iter *i)
501EXPORT_SYMBOL(iov_iter_single_seg_count); 501EXPORT_SYMBOL(iov_iter_single_seg_count);
502 502
503void iov_iter_kvec(struct iov_iter *i, int direction, 503void iov_iter_kvec(struct iov_iter *i, int direction,
504 const struct kvec *iov, unsigned long nr_segs, 504 const struct kvec *kvec, unsigned long nr_segs,
505 size_t count) 505 size_t count)
506{ 506{
507 BUG_ON(!(direction & ITER_KVEC)); 507 BUG_ON(!(direction & ITER_KVEC));
508 i->type = direction; 508 i->type = direction;
509 i->kvec = (struct kvec *)iov; 509 i->kvec = kvec;
510 i->nr_segs = nr_segs; 510 i->nr_segs = nr_segs;
511 i->iov_offset = 0; 511 i->iov_offset = 0;
512 i->count = count; 512 i->count = count;
513} 513}
514EXPORT_SYMBOL(iov_iter_kvec); 514EXPORT_SYMBOL(iov_iter_kvec);
515 515
516void iov_iter_bvec(struct iov_iter *i, int direction,
517 const struct bio_vec *bvec, unsigned long nr_segs,
518 size_t count)
519{
520 BUG_ON(!(direction & ITER_BVEC));
521 i->type = direction;
522 i->bvec = bvec;
523 i->nr_segs = nr_segs;
524 i->iov_offset = 0;
525 i->count = count;
526}
527EXPORT_SYMBOL(iov_iter_bvec);
528
516unsigned long iov_iter_alignment(const struct iov_iter *i) 529unsigned long iov_iter_alignment(const struct iov_iter *i)
517{ 530{
518 unsigned long res = 0; 531 unsigned long res = 0;