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; \
200 * fault_in_iov_iter_readable - fault in iov iterator for reading
242 * fault_in_iov_iter_writeable - fault in iov iterator for writing
285 const struct iovec *iov, unsigned long nr_segs,
295 .__iov = iov,
625 const struct iovec *iov, *end;
632 for (iov = iter_iov(i), end = iov + i->nr_segs; iov < end; iov++) {
633 if (likely(size < iov->iov_len))
635 size -= iov->iov_len;
638 i->nr_segs -= iov - iter_iov(i);
639 i->__iov = iov;
692 const struct iovec *iov = iter_iov(i);
694 size_t n = (--iov)->iov_len;
697 i->__iov = iov;
815 const struct iovec *iov = iter_iov(i) + k;
816 size_t len = iov->iov_len - skip;
822 if ((unsigned long)(iov->iov_base + skip) & addr_mask)
861 * @addr_mask: bit mask to check against the iov element's addresses
862 * @len_mask: bit mask to check against the iov element's lengths
902 const struct iovec *iov = iter_iov(i) + k;
903 size_t len = iov->iov_len - skip;
905 res |= (unsigned long)iov->iov_base + skip;
974 const struct iovec *iov = iter_iov(i) + k;
975 if (iov->iov_len) {
976 unsigned long base = (unsigned long)iov->iov_base;
979 v = base + iov->iov_len;
980 if (size <= iov->iov_len)
982 size -= iov->iov_len;
1068 const struct iovec *iov = iter_iov(i) + k;
1069 size_t len = iov->iov_len - skip;
1075 return (unsigned long)iov->iov_base + skip;
1333 static __noclone int copy_compat_iovec_from_user(struct iovec *iov,
1355 iov[i].iov_base = compat_ptr(buf);
1356 iov[i].iov_len = len;
1365 static __noclone int copy_iovec_from_user(struct iovec *iov,
1385 iov->iov_base = buf;
1386 iov->iov_len = len;
1388 uiov++; iov++;
1401 struct iovec *iov = fast_iov;
1410 return iov;
1414 iov = kmalloc_array(nr_segs, sizeof(struct iovec), GFP_KERNEL);
1415 if (!iov)
1420 ret = copy_compat_iovec_from_user(iov, uvec, nr_segs);
1422 ret = copy_iovec_from_user(iov, uvec, nr_segs);
1424 if (iov != fast_iov)
1425 kfree(iov);
1429 return iov;
1439 struct iovec *iov = *iovp;
1443 ret = copy_compat_iovec_from_user(iov, uvec, 1);
1445 ret = copy_iovec_from_user(iov, uvec, 1);
1449 ret = import_ubuf(type, iov->iov_base, iov->iov_len, i);
1462 struct iovec *iov;
1467 iov = iovec_from_user(uvec, nr_segs, fast_segs, *iovp, compat);
1468 if (IS_ERR(iov)) {
1470 return PTR_ERR(iov);
1482 ssize_t len = (ssize_t)iov[seg].iov_len;
1484 if (!access_ok(iov[seg].iov_base, len)) {
1485 if (iov != *iovp)
1486 kfree(iov);
1493 iov[seg].iov_len = len;
1498 iov_iter_init(i, type, iov, nr_segs, total_len);
1499 if (iov == *iovp)
1502 *iovp = iov;
1514 * @fast_segs: Number of elements in @iov.
1519 * If the array pointed to by *@iov is large enough to hold all @nr_segs,
1520 * then this function places %NULL in *@iov on return. Otherwise, a new
1521 * array will be allocated and the result placed in *@iov. This means that
1522 * the caller may call kfree() on *@iov regardless of whether the small
1538 struct iovec *iov, struct iov_iter *i)
1584 * For the *vec iters, nr_segs + iov is constant - if we increment
1588 * size, so we can just increment the iov pointer as they are unionzed.