Lines Matching refs:buf
161 char __user *buf; in copy_page_to_iter_iovec() local
174 buf = iov->iov_base + skip; in copy_page_to_iter_iovec()
177 if (IS_ENABLED(CONFIG_HIGHMEM) && !fault_in_pages_writeable(buf, copy)) { in copy_page_to_iter_iovec()
182 left = copyout(buf, from, copy); in copy_page_to_iter_iovec()
190 buf = iov->iov_base; in copy_page_to_iter_iovec()
192 left = copyout(buf, from, copy); in copy_page_to_iter_iovec()
203 buf += copy; in copy_page_to_iter_iovec()
211 left = copyout(buf, from, copy); in copy_page_to_iter_iovec()
218 buf = iov->iov_base; in copy_page_to_iter_iovec()
220 left = copyout(buf, from, copy); in copy_page_to_iter_iovec()
245 char __user *buf; in copy_page_from_iter_iovec() local
258 buf = iov->iov_base + skip; in copy_page_from_iter_iovec()
261 if (IS_ENABLED(CONFIG_HIGHMEM) && !fault_in_pages_readable(buf, copy)) { in copy_page_from_iter_iovec()
266 left = copyin(to, buf, copy); in copy_page_from_iter_iovec()
274 buf = iov->iov_base; in copy_page_from_iter_iovec()
276 left = copyin(to, buf, copy); in copy_page_from_iter_iovec()
287 buf += copy; in copy_page_from_iter_iovec()
295 left = copyin(to, buf, copy); in copy_page_from_iter_iovec()
302 buf = iov->iov_base; in copy_page_from_iter_iovec()
304 left = copyin(to, buf, copy); in copy_page_from_iter_iovec()
371 struct pipe_buffer *buf; in copy_page_to_iter_pipe() local
386 buf = &pipe->bufs[idx]; in copy_page_to_iter_pipe()
388 if (offset == off && buf->page == page) { in copy_page_to_iter_pipe()
390 buf->len += bytes; in copy_page_to_iter_pipe()
395 buf = &pipe->bufs[idx]; in copy_page_to_iter_pipe()
400 buf->ops = &page_cache_pipe_buf_ops; in copy_page_to_iter_pipe()
401 get_page(buf->page = page); in copy_page_to_iter_pipe()
402 buf->offset = offset; in copy_page_to_iter_pipe()
403 buf->len = bytes; in copy_page_to_iter_pipe()
478 static inline bool allocated(struct pipe_buffer *buf) in allocated() argument
480 return buf->ops == &default_pipe_buf_ops; in allocated()
1013 struct pipe_buffer *buf; in pipe_advance() local
1019 buf = &pipe->bufs[idx]; in pipe_advance()
1020 if (left <= buf->len) in pipe_advance()
1022 left -= buf->len; in pipe_advance()
1026 i->iov_offset = buf->offset + left; in pipe_advance()
1683 int import_single_range(int rw, void __user *buf, size_t len, in import_single_range() argument
1688 if (unlikely(!access_ok(buf, len))) in import_single_range()
1691 iov->iov_base = buf; in import_single_range()