函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-27 07:20:14
Last Modify:2022-05-21 11:43:54 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pipe_get_pages_alloc

函数原型:static ssize_t pipe_get_pages_alloc(struct iov_iter *i, struct page ***pages, size_t maxsize, size_t *start)

返回类型:ssize_t

参数:

类型参数名称
struct iov_iter *i
struct page ***pages
size_tmaxsize
size_t *start
1364  如果非maxsize则返回:0
1367  如果非sanity(i)则返回:负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等于npagesPAGE_SIZEstart
1374  如果maxsize大于nmaxsize等于n
1376  否则npages等于DIV_ROUND_UP(maxsize + * start, PAGE_SIZE)
1378  p等于get_pages_array(npages)
1379  如果非p则返回:负ENOMEM
1381  n等于__pipe_get_pages(i, maxsize, p, iter_head, start)
1382  如果n大于0则pages等于p
1384  否则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  返回:n
调用者
名称描述
iov_iter_get_pages_alloc