Lines Matching refs:offset
156 static size_t copy_page_to_iter_iovec(struct page *page, size_t offset, size_t bytes, in copy_page_to_iter_iovec() argument
179 from = kaddr + offset; in copy_page_to_iter_iovec()
202 offset = from - kaddr; in copy_page_to_iter_iovec()
210 from = kaddr + offset; in copy_page_to_iter_iovec()
240 static size_t copy_page_from_iter_iovec(struct page *page, size_t offset, size_t bytes, in copy_page_from_iter_iovec() argument
263 to = kaddr + offset; in copy_page_from_iter_iovec()
286 offset = to - kaddr; in copy_page_from_iter_iovec()
294 to = kaddr + offset; in copy_page_from_iter_iovec()
338 if (unlikely(p->offset + p->len != i->iov_offset)) in sanity()
353 pipe->bufs[idx].offset, in sanity()
367 static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t bytes, in copy_page_to_iter_pipe() argument
388 if (offset == off && buf->page == page) { in copy_page_to_iter_pipe()
402 buf->offset = offset; in copy_page_to_iter_pipe()
404 i->iov_offset = offset + bytes; in copy_page_to_iter_pipe()
457 static void memcpy_from_page(char *to, struct page *page, size_t offset, size_t len) in memcpy_from_page() argument
460 memcpy(to, from + offset, len); in memcpy_from_page()
464 static void memcpy_to_page(struct page *page, size_t offset, const char *from, size_t len) in memcpy_to_page() argument
467 memcpy(to + offset, from, len); in memcpy_to_page()
471 static void memzero_page(struct page *page, size_t offset, size_t len) in memzero_page() argument
474 memset(addr + offset, 0, len); in memzero_page()
528 pipe->bufs[idx].offset = 0; in push_pipe()
631 static unsigned long memcpy_mcsafe_to_page(struct page *page, size_t offset, in memcpy_mcsafe_to_page() argument
638 ret = memcpy_mcsafe(to + offset, from, len); in memcpy_mcsafe_to_page()
863 static inline bool page_copy_sane(struct page *page, size_t offset, size_t n) in page_copy_sane() argument
866 size_t v = n + offset; in page_copy_sane()
887 size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, in copy_page_to_iter() argument
890 if (unlikely(!page_copy_sane(page, offset, bytes))) in copy_page_to_iter()
894 size_t wanted = copy_to_iter(kaddr + offset, bytes, i); in copy_page_to_iter()
900 return copy_page_to_iter_iovec(page, offset, bytes, i); in copy_page_to_iter()
902 return copy_page_to_iter_pipe(page, offset, bytes, i); in copy_page_to_iter()
906 size_t copy_page_from_iter(struct page *page, size_t offset, size_t bytes, in copy_page_from_iter() argument
909 if (unlikely(!page_copy_sane(page, offset, bytes))) in copy_page_from_iter()
917 size_t wanted = _copy_from_iter(kaddr + offset, bytes, i); in copy_page_from_iter()
921 return copy_page_from_iter_iovec(page, offset, bytes, i); in copy_page_from_iter()
964 struct iov_iter *i, unsigned long offset, size_t bytes) in iov_iter_copy_from_user_atomic() argument
966 char *kaddr = kmap_atomic(page), *p = kaddr + offset; in iov_iter_copy_from_user_atomic()
967 if (unlikely(!page_copy_sane(page, offset, bytes))) { in iov_iter_copy_from_user_atomic()
995 pipe->bufs[idx].len = off - pipe->bufs[idx].offset; in pipe_truncate()
1017 left += off - pipe->bufs[idx].offset; in pipe_advance()
1026 i->iov_offset = buf->offset + left; in pipe_advance()
1059 size_t n = off - pipe->bufs[idx].offset; in iov_iter_revert()
1071 off = pipe->bufs[idx].offset + pipe->bufs[idx].len; in iov_iter_revert()