Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-28 06:22:08
Last Modify:2022-05-21 11:43:54 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:copy_page_from_iter

Proto:size_t copy_page_from_iter(struct page *page, size_t offset, size_t bytes, struct iov_iter *i)

Type:size_t

Parameter:

TypeParameterName
struct page *page
size_toffset
size_tbytes
struct iov_iter *i
929  If Value for the false possibility is greater at compile time(!page_copy_sane(page, offset, bytes)) Then Return 0
931  If Value for the false possibility is greater at compile time(iov_iter_is_pipe(i) || iov_iter_is_discard(i)) Then
932  WARN_ON(1)
933  Return 0
935  If * Bit 0 is the read/write bit, set if we're writing. * Bit 1 is the BVEC_FLAG_NO_REF bit, set if type is a bvec and * the caller isn't expecting to drop a page reference when done. & (ITER_BVEC | ITER_KVEC) Then
936  kaddr = kmap_atomic(page)
937  wanted = _copy_from_iter(kaddr + offset, bytes, i)
938  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(kaddr)
939  Return wanted
940  Else Return copy_page_from_iter_iovec(page, offset, bytes, i)
Caller
NameDescribe
pipe_write