Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-28 14:01:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:add_to_page_cache_lru

Proto:int add_to_page_cache_lru(struct page *page, struct address_space *mapping, unsigned long offset, gfp_t gfp_mask)

Type:int

Parameter:

TypeParameterName
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  If Value for the false possibility is greater at compile time(ret) Then __ClearPageLocked(page)
947  Else
956  WARN_ON_ONCE(PageActive(page))
957  If Not (gfp_mask & __GFP_WRITE) && shadow Then workingset_refault(page, shadow)
959  linux/mm/swap.c
961  Return ret
Caller
NameDescribe
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