Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pipe_get_pages_alloc

Proto:static ssize_t pipe_get_pages_alloc(struct iov_iter *i, struct page ***pages, size_t maxsize, size_t *start)

Type:ssize_t

Parameter:

TypeParameterName
struct iov_iter *i
struct page ***pages
size_tmaxsize
size_t *start
1364  If Not maxsize Then Return 0
1367  If Not sanity(i) Then Return -EFAULT
1370  data_start(i, & iter_head, start)
1372  npages = pipe_space_for_user - Return number of slots available to userspace*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer*@pipe: The pipe info structure
1373  n = npages * PAGE_SIZE - start
1374  If maxsize > n Then maxsize = n
1376  Else npages = DIV_ROUND_UP(maxsize + * start, PAGE_SIZE)
1378  p = get_pages_array(npages)
1379  If Not p Then Return -ENOMEM
1381  n = __pipe_get_pages(i, maxsize, p, iter_head, start)
1382  If n > 0 Then pages = p
1384  Else kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
1386  Return n
Caller
NameDescribe
iov_iter_get_pages_alloc