Lines Matching refs:nr_segs

134 			i->nr_segs -= iov - i->iov;		\
142 i->nr_segs -= bvec - i->bvec; \
150 i->nr_segs -= kvec - i->kvec; \
425 const struct iovec *iov, unsigned long nr_segs, in iov_iter_init() argument
435 .nr_segs = nr_segs, in iov_iter_init()
865 for (bvec = i->bvec, end = bvec + i->nr_segs; bvec < end; bvec++) { in iov_iter_bvec_advance()
871 i->nr_segs -= bvec - i->bvec; in iov_iter_bvec_advance()
884 for (iov = i->iov, end = iov + i->nr_segs; iov < end; iov++) { in iov_iter_iovec_advance()
890 i->nr_segs -= iov - i->iov; in iov_iter_iovec_advance()
957 i->nr_segs++; in iov_iter_revert()
969 i->nr_segs++; in iov_iter_revert()
986 if (i->nr_segs > 1) { in iov_iter_single_seg_count()
997 const struct kvec *kvec, unsigned long nr_segs, in iov_iter_kvec() argument
1005 .nr_segs = nr_segs, in iov_iter_kvec()
1013 const struct bio_vec *bvec, unsigned long nr_segs, in iov_iter_bvec() argument
1021 .nr_segs = nr_segs, in iov_iter_bvec()
1102 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_aligned_iovec()
1126 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_aligned_bvec()
1201 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_alignment_iovec()
1223 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_alignment_bvec()
1280 for (k = 0; k < i->nr_segs; k++) { in iov_iter_gap_alignment()
1403 for (k = 0, skip = i->iov_offset; k < i->nr_segs; k++, skip = 0) { in first_iovec_segment()
1484 i->nr_segs--; in __iov_iter_get_pages_alloc()
1672 new->nr_segs * sizeof(struct bio_vec), in dup_iter()
1677 new->nr_segs * sizeof(struct iovec), in dup_iter()
1684 const struct iovec __user *uvec, unsigned long nr_segs) in copy_compat_iovec_from_user() argument
1690 if (!user_access_begin(uiov, nr_segs * sizeof(*uiov))) in copy_compat_iovec_from_user()
1693 for (i = 0; i < nr_segs; i++) { in copy_compat_iovec_from_user()
1716 const struct iovec __user *uvec, unsigned long nr_segs) in copy_iovec_from_user() argument
1720 if (copy_from_user(iov, uvec, nr_segs * sizeof(*uvec))) in copy_iovec_from_user()
1722 for (seg = 0; seg < nr_segs; seg++) { in copy_iovec_from_user()
1731 unsigned long nr_segs, unsigned long fast_segs, in iovec_from_user() argument
1742 if (nr_segs == 0) in iovec_from_user()
1744 if (nr_segs > UIO_MAXIOV) in iovec_from_user()
1746 if (nr_segs > fast_segs) { in iovec_from_user()
1747 iov = kmalloc_array(nr_segs, sizeof(struct iovec), GFP_KERNEL); in iovec_from_user()
1753 ret = copy_compat_iovec_from_user(iov, uvec, nr_segs); in iovec_from_user()
1755 ret = copy_iovec_from_user(iov, uvec, nr_segs); in iovec_from_user()
1766 unsigned nr_segs, unsigned fast_segs, struct iovec **iovp, in __import_iovec() argument
1773 iov = iovec_from_user(uvec, nr_segs, fast_segs, *iovp, compat); in __import_iovec()
1787 for (seg = 0; seg < nr_segs; seg++) { in __import_iovec()
1804 iov_iter_init(i, type, iov, nr_segs, total_len); in __import_iovec()
1835 unsigned nr_segs, unsigned fast_segs, in import_iovec() argument
1838 return __import_iovec(type, uvec, nr_segs, fast_segs, iovp, i, in import_iovec()
1890 i->bvec -= state->nr_segs - i->nr_segs; in iov_iter_restore()
1892 i->iov -= state->nr_segs - i->nr_segs; in iov_iter_restore()
1893 i->nr_segs = state->nr_segs; in iov_iter_restore()