函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-27 15:41:32
Last Modify:2022-05-23 13:41:30 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Attempt to detach a locked page from its ->mapping. If it is dirty or if* someone else has a ref on the page, abort and return 0. If it was* successfully detached, return 1. Assumes the caller has a single ref on* this page.

函数原型:int remove_mapping(struct address_space *mapping, struct page *page)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
struct page *page
961  如果Same as remove_mapping, but if the page is removed from the mapping, it* gets returned with a refcount of 0.
967  page_ref_unfreeze(page, 1)
968  返回:1
970  返回:0
调用者
名称描述
invalidate_complete_pageThis is for invalidate_mapping_pages(). That function can be called at* any time, and is not supposed to throw away dirty pages. But pages can* be marked dirty at any time too, so use remove_mapping which safely* discards clean, unused pages.
page_cache_pipe_buf_stealAttempt to steal a page from a pipe buffer. This should perhaps go into* a vm helper function, it's already simplified quite a bit by the* addition of remove_mapping(). If success is returned, the caller may