Lines Matching refs:iov

129 			const struct iovec *iov = i->iov;	\
133 iov, (I)) \
134 i->nr_segs -= iov - i->iov; \
135 i->iov = iov; \
364 for (p = i->iov, skip = i->iov_offset; count; p++, skip = 0) { in fault_in_iov_iter_readable()
407 for (p = i->iov, skip = i->iov_offset; count; p++, skip = 0) { in fault_in_iov_iter_writeable()
425 const struct iovec *iov, unsigned long nr_segs, in iov_iter_init() argument
434 .iov = iov, in iov_iter_init()
877 const struct iovec *iov, *end; in iov_iter_iovec_advance() local
884 for (iov = i->iov, end = iov + i->nr_segs; iov < end; iov++) { in iov_iter_iovec_advance()
885 if (likely(size < iov->iov_len)) in iov_iter_iovec_advance()
887 size -= iov->iov_len; in iov_iter_iovec_advance()
890 i->nr_segs -= iov - i->iov; in iov_iter_iovec_advance()
891 i->iov = iov; in iov_iter_iovec_advance()
966 const struct iovec *iov = i->iov; in iov_iter_revert() local
968 size_t n = (--iov)->iov_len; in iov_iter_revert()
971 i->iov = iov; in iov_iter_revert()
988 return min(i->count, i->iov->iov_len - i->iov_offset); in iov_iter_single_seg_count()
1103 size_t len = i->iov[k].iov_len - skip; in iov_iter_aligned_iovec()
1109 if ((unsigned long)(i->iov[k].iov_base + skip) & addr_mask) in iov_iter_aligned_iovec()
1202 size_t len = i->iov[k].iov_len - skip; in iov_iter_alignment_iovec()
1204 res |= (unsigned long)i->iov[k].iov_base + skip; in iov_iter_alignment_iovec()
1281 if (i->iov[k].iov_len) { in iov_iter_gap_alignment()
1282 unsigned long base = (unsigned long)i->iov[k].iov_base; in iov_iter_gap_alignment()
1285 v = base + i->iov[k].iov_len; in iov_iter_gap_alignment()
1286 if (size <= i->iov[k].iov_len) in iov_iter_gap_alignment()
1288 size -= i->iov[k].iov_len; in iov_iter_gap_alignment()
1404 size_t len = i->iov[k].iov_len - skip; in first_iovec_segment()
1410 return (unsigned long)i->iov[k].iov_base + skip; in first_iovec_segment()
1599 for (p = i->iov; size; skip = 0, p++) { in iov_npages()
1676 return new->iov = kmemdup(new->iov, in dup_iter()
1683 static int copy_compat_iovec_from_user(struct iovec *iov, in copy_compat_iovec_from_user() argument
1705 iov[i].iov_base = compat_ptr(buf); in copy_compat_iovec_from_user()
1706 iov[i].iov_len = len; in copy_compat_iovec_from_user()
1715 static int copy_iovec_from_user(struct iovec *iov, in copy_iovec_from_user() argument
1720 if (copy_from_user(iov, uvec, nr_segs * sizeof(*uvec))) in copy_iovec_from_user()
1723 if ((ssize_t)iov[seg].iov_len < 0) in copy_iovec_from_user()
1734 struct iovec *iov = fast_iov; in iovec_from_user() local
1743 return iov; in iovec_from_user()
1747 iov = kmalloc_array(nr_segs, sizeof(struct iovec), GFP_KERNEL); in iovec_from_user()
1748 if (!iov) 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()
1757 if (iov != fast_iov) in iovec_from_user()
1758 kfree(iov); in iovec_from_user()
1762 return iov; in iovec_from_user()
1771 struct iovec *iov; in __import_iovec() local
1773 iov = iovec_from_user(uvec, nr_segs, fast_segs, *iovp, compat); in __import_iovec()
1774 if (IS_ERR(iov)) { in __import_iovec()
1776 return PTR_ERR(iov); in __import_iovec()
1788 ssize_t len = (ssize_t)iov[seg].iov_len; in __import_iovec()
1790 if (!access_ok(iov[seg].iov_base, len)) { in __import_iovec()
1791 if (iov != *iovp) in __import_iovec()
1792 kfree(iov); in __import_iovec()
1799 iov[seg].iov_len = len; in __import_iovec()
1804 iov_iter_init(i, type, iov, nr_segs, total_len); in __import_iovec()
1805 if (iov == *iovp) in __import_iovec()
1808 *iovp = iov; in __import_iovec()
1844 struct iovec *iov, struct iov_iter *i) in import_single_range() argument
1851 iov->iov_base = buf; in import_single_range()
1852 iov->iov_len = len; in import_single_range()
1853 iov_iter_init(i, rw, iov, 1, len); in import_single_range()
1892 i->iov -= state->nr_segs - i->nr_segs; in iov_iter_restore()