函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_read_cache_page

函数原型:static struct page *do_read_cache_page(struct address_space *mapping, unsigned long index, int (*filler)(void *, struct page *), void *data, gfp_t gfp)

返回类型:struct page

参数:

类型参数名称
struct address_space *mapping
unsigned longindex
int (*filler
void *data
gfp_tgfp
2764  repeat :
2765  page等于d_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.
2766  如果非page
2767  page等于__page_cache_alloc(gfp)
2768  如果非page则返回:错误号
2770  err等于add_to_page_cache_lru(page, mapping, index, gfp)
2772  put_page(page)
2773  如果err恒等于负EEXIST则转到:repeat
2776  返回:错误号
2779  filler :
2780  如果fillererr等于filler(data, page)
2782  否则err等于readpage(data, page)
2785  如果err小于0则
2786  put_page(page)
2787  返回:错误号
2790  page等于wait_on_page_read(page)
2791  如果是错误则返回:page
2793  转到:out
2795  如果PageUptodate(page)则转到:out
2829  Wait for a page to be unlocked.* This must be called with the caller "holding" the page,* ie with increased "page->count" so that the page won't* go away during the wait..
2830  如果PageUptodate(page)则转到:out
2834  lock_page may only be called if we have the page's inode pinned.
2837  如果非 See page-flags.h for PAGE_MAPPING_FLAGS
2838  lock_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.
2839  put_page(page)
2840  转到:repeat
2844  如果PageUptodate(page)则
2845  lock_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.
2846  转到:out
2848  转到:filler
2850  out :
2851  mark_page_accessed(page)
2852  返回:page
调用者
名称描述
read_cache_pagead_cache_page - read into page cache, fill it if needed*@mapping: the page's address_space*@index: the page index*@filler: function to perform the read*@data: first arg to filler(data, page) function, often left as NULL* Read into the page cache
read_cache_page_gfpad_cache_page_gfp - read into page cache, using specified page allocation flags