Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:csum_and_copy_to_iter

Proto:size_t csum_and_copy_to_iter(const void *addr, size_t bytes, void *csump, struct iov_iter *i)

Type:size_t

Parameter:

TypeParameterName
const void *addr
size_tbytes
void *csump
struct iov_iter *i
1524  from = addr
1525  csum = csump
1527  off = 0
1529  If Value for the false possibility is greater at compile time(iov_iter_is_pipe(i)) Then Return csum_and_copy_to_pipe_iter(addr, bytes, csum, i)
1532  sum = csum
1533  If Value for the false possibility is greater at compile time(iov_iter_is_discard(i)) Then
1534  WARN_ON(1)
1535  Return 0
1537  iterate_and_advance(i, bytes, v, ({interr = 0;next = csum_and_copy_to_user((from += iov_len) - iov_len, iov_base, 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(p + bv_offset, (from += bv_len) - bv_len, 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(iov_base, (from += iov_len) - iov_len, iov_len, sum, off);off += iov_len;}))
1561  csum = sum
1562  Return bytes