函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:unaccount_page_cache_page

函数原型:static void unaccount_page_cache_page(struct address_space *mapping, struct page *page)

返回类型:void

参数:

类型参数名称
struct address_space *mapping
struct page *page
166  如果PageUptodate(page)且PageMappedToDisk(page)则cleancache_put_page(page)
168  否则cleancache_invalidate_page(mapping, page)
171  VM_BUG_ON_PAGE(PageTail(page), page)
172  VM_BUG_ON_PAGE(page_mapped(page), page)
173  如果非IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_DEBUG_VM)且此条件成立可能性小(为编译器优化)(page_mapped(page))则
176  打印警报信息("BUG: Bad page cache in process %s pfn:%05lx\n", comm, page_to_pfn(page))
178  dump_page(page, "still mapped when deleted")
179  dump_stack()
180  add_taint: add a taint flag if not already set.*@flag: one of the TAINT_* constants.*@lockdep_ok: whether lock debugging is still OK.* If something bad has gone wrong, you'll want @lockdebug_ok = false, but for
182  mapcount等于page_mapcount(page)
183  如果mapping_exiting(mapping)且page_count(page)大于等于mapcount加2则
197  如果PageHuge(page)则返回
200  nr等于hpage_nr_pages(page)
202  __mod_node_page_state(page_pgdat(page), NR_FILE_PAGES, - nr)
203  如果PageSwapBacked(page)则
204  __mod_node_page_state(page_pgdat(page), NR_SHMEM, - nr)
205  如果PageHuge() only returns true for hugetlbfs pages, but not for* normal or transparent huge pages.* PageTransHuge() returns true for both transparent huge and* hugetlbfs pages, but not normal pages. PageTransHuge() can only be__dec_node_page_state(page, NR_SHMEM_THPS)
207  否则如果PageHuge() only returns true for hugetlbfs pages, but not for* normal or transparent huge pages.* PageTransHuge() returns true for both transparent huge and* hugetlbfs pages, but not normal pages. PageTransHuge() can only be
208  __dec_node_page_state(page, NR_FILE_THPS)
209  filemap_nr_thps_dec(mapping)
222  如果WARN_ON_ONCE(PageDirty(page))则account_page_cleaned(page, mapping, inode_to_wb(host))
调用者
名称描述
__delete_from_page_cacheDelete a page from the page cache and free it. Caller has to make* sure the page is locked and that nobody else uses it - or that usage* is safe. The caller must hold the i_pages lock.
delete_from_page_cache_batch