函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-27 15:24:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:add_to_page_cache_lru

函数原型:int add_to_page_cache_lru(struct page *page, struct address_space *mapping, unsigned long offset, gfp_t gfp_mask)

返回类型:int

参数:

类型参数名称
struct page *page
struct address_space *mapping
unsigned longoffset
gfp_tgfp_mask
939  void * shadow = NULL
942  __SetPageLocked(page)
943  ret等于__add_to_page_cache_locked(page, mapping, offset, gfp_mask, & shadow)
945  如果此条件成立可能性小(为编译器优化)(ret)则__ClearPageLocked(page)
947  否则
956  WARN_ON_ONCE(PageActive(page))
957  如果非gfp_mask按位与__GFP_WRITE的值且shadowworkingset_refault(page, shadow)
959  linux/mm/swap.c
961  返回:ret
调用者
名称描述
pagecache_get_pagepagecache_get_page - find and get a page reference*@mapping: the address_space to search*@offset: the page index*@fgp_flags: PCG flags*@gfp_mask: gfp mask to use for the page cache data page allocation* Looks up the page cache slot at @mapping & @offset.
generic_file_buffered_readgeneric_file_buffered_read - generic file read routine*@iocb: the iocb to read*@iter: data destination*@written: already copied* This is a generic file read routine, and uses the* mapping->a_ops->readpage() function for the actual low-level stuff.
do_read_cache_page
read_cache_pagesad_cache_pages - populate an address space with some pages & start reads against them*@mapping: the address_space*@pages: The address of a list_head which contains the target pages. These* pages have their ->index populated and are otherwise uninitialised.
read_pages
iomap_next_page
ramfs_nommu_expand_for_mappingadd a contiguous set of pages into a ramfs inode when it's truncated from* size 0 on the assumption that it's going to be used for an mmap of shared* memory
mpage_readpagesmpage_readpages - populate an address space with some pages & start reads against them*@mapping: the address_space*@pages: The address of a list_head which contains the target pages. These