Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:csum_and_copy_from_iter

Proto:size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i)

Type:size_t

Parameter:

TypeParameterName
void *addr
size_tbytes
__wsum *csum
struct iov_iter *i
1441  to = addr
1443  off = 0
1444  sum = csum
1445  If Value for the false possibility is greater at compile time(iov_iter_is_pipe(i) || iov_iter_is_discard(i)) Then
1446  WARN_ON(1)
1447  Return 0
1449  iterate_and_advance(i, bytes, v, ({interr = 0;next = csum_and_copy_from_user(iov_base, (to += iov_len) - iov_len, iov_len, 0, & err);If Not err Then {sum = csum_block_add(sum, next, off);off += iov_len;}err ? iov_len : 0;}), ({char * p = kmap_atomic(bv_page);sum = csum_and_memcpy((to += bv_len) - bv_len, p + bv_offset, bv_len, sum, off);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.(p);off += bv_len;}), ({sum = csum_and_memcpy((to += iov_len) - iov_len, iov_base, iov_len, sum, off);off += iov_len;}))
1473  csum = sum
1474  Return bytes