函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Lock ordering:* ->i_mmap_rwsem (truncate_pagecache)* ->private_lock (__free_pte->__set_page_dirty_buffers)* ->swap_lock (exclusive_swap_page, others)* ->i_pages lock* ->i_mutex* ->i_mmap_rwsem (truncate->unmap_mapping_range)* ->mmap_sem* ->i_mmap_rwsem

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

返回类型:void

参数:

类型参数名称
struct address_space *mapping
struct page *page
void *shadow
122  XA_STATE() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.* Declare and initialise an xa_state on the stack.(xas, & i_pages, Our offset within mapping. )
123  nr等于1
125  mapping_set_update( & xas, mapping)
128  如果非PageHuge(page)则
129  xas_set_order() - Set up XArray operation state for a multislot entry.*@xas: XArray operation state.*@index: Target of the operation.*@order: Entry occupies 2^@order indices.
130  nr等于Returns the number of pages in this potentially compound page.
133  VM_BUG_ON_PAGE(!PageLocked(page), page)
134  VM_BUG_ON_PAGE(PageTail(page), page)
135  VM_BUG_ON_PAGE(nr != 1 && shadow, page)
137  xas_store() - Store this entry in the XArray
138  xas_init_marks() - Initialise all marks for the entry*@xas: Array operations state
140  See page-flags.h for PAGE_MAPPING_FLAGS = NULL
143  如果shadow
144  nrexceptional加等于nr
151  smp_wmb()
153  nrpages减等于nr
调用者
名称描述
__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.