Lines Matching refs:iov
127 const struct iovec *iov = iter_iov(i); \
131 iov, (I)) \
132 i->nr_segs -= iov - iter_iov(i); \
133 i->__iov = iov; \
285 const struct iovec *iov, unsigned long nr_segs, in iov_iter_init() argument
295 .__iov = iov, in iov_iter_init()
625 const struct iovec *iov, *end; in iov_iter_iovec_advance() local
632 for (iov = iter_iov(i), end = iov + i->nr_segs; iov < end; iov++) { in iov_iter_iovec_advance()
633 if (likely(size < iov->iov_len)) in iov_iter_iovec_advance()
635 size -= iov->iov_len; in iov_iter_iovec_advance()
638 i->nr_segs -= iov - iter_iov(i); in iov_iter_iovec_advance()
639 i->__iov = iov; in iov_iter_iovec_advance()
692 const struct iovec *iov = iter_iov(i); in iov_iter_revert() local
694 size_t n = (--iov)->iov_len; in iov_iter_revert()
697 i->__iov = iov; in iov_iter_revert()
815 const struct iovec *iov = iter_iov(i) + k; in iov_iter_aligned_iovec() local
816 size_t len = iov->iov_len - skip; in iov_iter_aligned_iovec()
822 if ((unsigned long)(iov->iov_base + skip) & addr_mask) in iov_iter_aligned_iovec()
902 const struct iovec *iov = iter_iov(i) + k; in iov_iter_alignment_iovec() local
903 size_t len = iov->iov_len - skip; in iov_iter_alignment_iovec()
905 res |= (unsigned long)iov->iov_base + skip; in iov_iter_alignment_iovec()
974 const struct iovec *iov = iter_iov(i) + k; in iov_iter_gap_alignment() local
975 if (iov->iov_len) { in iov_iter_gap_alignment()
976 unsigned long base = (unsigned long)iov->iov_base; in iov_iter_gap_alignment()
979 v = base + iov->iov_len; in iov_iter_gap_alignment()
980 if (size <= iov->iov_len) in iov_iter_gap_alignment()
982 size -= iov->iov_len; in iov_iter_gap_alignment()
1068 const struct iovec *iov = iter_iov(i) + k; in first_iovec_segment() local
1069 size_t len = iov->iov_len - skip; in first_iovec_segment()
1075 return (unsigned long)iov->iov_base + skip; in first_iovec_segment()
1333 static __noclone int copy_compat_iovec_from_user(struct iovec *iov, in copy_compat_iovec_from_user() argument
1355 iov[i].iov_base = compat_ptr(buf); in copy_compat_iovec_from_user()
1356 iov[i].iov_len = len; in copy_compat_iovec_from_user()
1365 static __noclone int copy_iovec_from_user(struct iovec *iov, in copy_iovec_from_user() argument
1385 iov->iov_base = buf; in copy_iovec_from_user()
1386 iov->iov_len = len; in copy_iovec_from_user()
1388 uiov++; iov++; in copy_iovec_from_user()
1401 struct iovec *iov = fast_iov; in iovec_from_user() local
1410 return iov; in iovec_from_user()
1414 iov = kmalloc_array(nr_segs, sizeof(struct iovec), GFP_KERNEL); in iovec_from_user()
1415 if (!iov) in iovec_from_user()
1420 ret = copy_compat_iovec_from_user(iov, uvec, nr_segs); in iovec_from_user()
1422 ret = copy_iovec_from_user(iov, uvec, nr_segs); in iovec_from_user()
1424 if (iov != fast_iov) in iovec_from_user()
1425 kfree(iov); in iovec_from_user()
1429 return iov; in iovec_from_user()
1439 struct iovec *iov = *iovp; in __import_iovec_ubuf() local
1443 ret = copy_compat_iovec_from_user(iov, uvec, 1); in __import_iovec_ubuf()
1445 ret = copy_iovec_from_user(iov, uvec, 1); in __import_iovec_ubuf()
1449 ret = import_ubuf(type, iov->iov_base, iov->iov_len, i); in __import_iovec_ubuf()
1462 struct iovec *iov; in __import_iovec() local
1467 iov = iovec_from_user(uvec, nr_segs, fast_segs, *iovp, compat); in __import_iovec()
1468 if (IS_ERR(iov)) { in __import_iovec()
1470 return PTR_ERR(iov); in __import_iovec()
1482 ssize_t len = (ssize_t)iov[seg].iov_len; in __import_iovec()
1484 if (!access_ok(iov[seg].iov_base, len)) { in __import_iovec()
1485 if (iov != *iovp) in __import_iovec()
1486 kfree(iov); in __import_iovec()
1493 iov[seg].iov_len = len; in __import_iovec()
1498 iov_iter_init(i, type, iov, nr_segs, total_len); in __import_iovec()
1499 if (iov == *iovp) in __import_iovec()
1502 *iovp = iov; in __import_iovec()
1538 struct iovec *iov, struct iov_iter *i) in import_single_range() argument