函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pagecache_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.

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

返回类型:struct page

参数:

类型参数名称
struct address_space *mapping
unsigned longoffset
intfgp_flags
gfp_tgfp_mask
1634  repeat :
1635  page等于d_get_entry - find and get a page cache entry*@mapping: the address_space to search*@offset: the page cache index* Looks up the page cache slot at @mapping & @offset
1636  如果xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.page = NULL
1638  如果非page则转到:no_page
1641  如果fgp_flags按位与FGP_LOCK
1642  如果fgp_flags按位与FGP_NOWAIT
1644  put_page(page)
1645  返回:NULL
1647  否则
1654  put_page(page)
1655  转到:repeat
1657  VM_BUG_ON_PAGE( Our offset within mapping. != offset, page)
1660  如果fgp_flags按位与FGP_ACCESSEDmark_page_accessed(page)
1663  no_page :
1664  如果非pagefgp_flags按位与FGP_CREAT
1666  如果fgp_flags按位与FGP_WRITEmapping_cap_account_dirty(mapping)则gfp_mask或等于__GFP_WRITE
1668  如果fgp_flags按位与FGP_NOFSgfp_mask与等于__GFP_FS的反
1671  page等于__page_cache_alloc(gfp_mask)
1672  如果非page则返回:NULL
1675  如果WARN_ON_ONCE(!(fgp_flags & (FGP_LOCK | FGP_FOR_MMAP)))则fgp_flags或等于FGP_LOCK
1679  如果fgp_flags按位与FGP_ACCESSED__SetPageReferenced(page)
1682  err等于add_to_page_cache_lru(page, mapping, offset, gfp_mask)
1684  put_page(page)
1685  page = NULL
1686  如果err恒等于负EEXIST则转到:repeat
1694  如果pagefgp_flags按位与FGP_FOR_MMAPlock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
1698  返回:page
调用者
名称描述
filemap_faultlemap_fault - read in file data for page fault handling*@vmf: struct vm_fault containing details of the fault* filemap_fault() is invoked via the vma operations vector for a* mapped memory region to read in file data during a page fault
grab_cache_page_write_beginFind or create a page at the given pagecache position. Return the locked* page. This function is specifically for buffered writes.
find_get_paged_get_page - find and get a page reference*@mapping: the address_space to search*@offset: the page index* Looks up the page cache slot at @mapping & @offset. If there is a* page cache page, it is returned with an increased refcount.
find_get_page_flags
find_lock_paged_lock_page - locate, pin and lock a pagecache page*@mapping: the address_space to search*@offset: the page index* Looks up the page cache slot at @mapping & @offset. If there is a* page cache page, it is returned locked and with an increased* refcount.
find_or_create_paged_or_create_page - locate or add a pagecache page*@mapping: the page's address_space*@index: the page's index into the mapping*@gfp_mask: page allocation mode* Looks up the page cache slot at @mapping & @offset
grab_cache_page_nowaitgrab_cache_page_nowait - returns locked page at given index in given cache*@mapping: target address_space*@index: the page index* Same as grab_cache_page(), but do not wait if the page is unavailable