Lines Matching refs:nr_segs

121 			i->nr_segs -= iov - i->iov;		\
129 i->nr_segs -= bvec - i->bvec; \
137 i->nr_segs -= kvec - i->kvec; \
251 i->nr_segs -= iov - i->iov; in copy_page_to_iter_iovec()
335 i->nr_segs -= iov - i->iov; in copy_page_from_iter_iovec()
510 const struct iovec *iov, unsigned long nr_segs, in iov_iter_init() argument
519 .nr_segs = nr_segs, in iov_iter_init()
1040 i->nr_segs -= bi.bi_idx; in iov_iter_bvec_advance()
1054 for (iov = i->iov, end = iov + i->nr_segs; iov < end; iov++) { in iov_iter_iovec_advance()
1060 i->nr_segs -= iov - i->iov; in iov_iter_iovec_advance()
1133 i->nr_segs++; in iov_iter_revert()
1145 i->nr_segs++; in iov_iter_revert()
1162 if (i->nr_segs > 1) { in iov_iter_single_seg_count()
1173 const struct kvec *kvec, unsigned long nr_segs, in iov_iter_kvec() argument
1181 .nr_segs = nr_segs, in iov_iter_kvec()
1189 const struct bio_vec *bvec, unsigned long nr_segs, in iov_iter_bvec() argument
1197 .nr_segs = nr_segs, in iov_iter_bvec()
1278 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_alignment_iovec()
1300 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_alignment_bvec()
1348 for (k = 0; k < i->nr_segs; k++) { in iov_iter_gap_alignment()
1481 for (k = 0, skip = i->iov_offset; k < i->nr_segs; k++, skip = 0) { in first_iovec_segment()
1848 new->nr_segs * sizeof(struct bio_vec), in dup_iter()
1853 new->nr_segs * sizeof(struct iovec), in dup_iter()
1859 const struct iovec __user *uvec, unsigned long nr_segs) in copy_compat_iovec_from_user() argument
1865 if (!user_access_begin(uiov, nr_segs * sizeof(*uiov))) in copy_compat_iovec_from_user()
1868 for (i = 0; i < nr_segs; i++) { in copy_compat_iovec_from_user()
1891 const struct iovec __user *uvec, unsigned long nr_segs) in copy_iovec_from_user() argument
1895 if (copy_from_user(iov, uvec, nr_segs * sizeof(*uvec))) in copy_iovec_from_user()
1897 for (seg = 0; seg < nr_segs; seg++) { in copy_iovec_from_user()
1906 unsigned long nr_segs, unsigned long fast_segs, in iovec_from_user() argument
1917 if (nr_segs == 0) in iovec_from_user()
1919 if (nr_segs > UIO_MAXIOV) in iovec_from_user()
1921 if (nr_segs > fast_segs) { in iovec_from_user()
1922 iov = kmalloc_array(nr_segs, sizeof(struct iovec), GFP_KERNEL); in iovec_from_user()
1928 ret = copy_compat_iovec_from_user(iov, uvec, nr_segs); in iovec_from_user()
1930 ret = copy_iovec_from_user(iov, uvec, nr_segs); in iovec_from_user()
1941 unsigned nr_segs, unsigned fast_segs, struct iovec **iovp, in __import_iovec() argument
1948 iov = iovec_from_user(uvec, nr_segs, fast_segs, *iovp, compat); in __import_iovec()
1962 for (seg = 0; seg < nr_segs; seg++) { in __import_iovec()
1979 iov_iter_init(i, type, iov, nr_segs, total_len); in __import_iovec()
2010 unsigned nr_segs, unsigned fast_segs, in import_iovec() argument
2013 return __import_iovec(type, uvec, nr_segs, fast_segs, iovp, i, in import_iovec()
2063 i->bvec -= state->nr_segs - i->nr_segs; in iov_iter_restore()
2065 i->iov -= state->nr_segs - i->nr_segs; in iov_iter_restore()
2066 i->nr_segs = state->nr_segs; in iov_iter_restore()