函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Notify the address space that the page is about to become writable so that* it can prohibit this or wait for the page to get into an appropriate state.* We do this without the lock held, so that it can sleep if it needs to.

函数原型:static vm_fault_t do_page_mkwrite(struct vm_fault *vmf)

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
2338  page等于->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR).
2339  old_flags等于FAULT_FLAG_xxx flags
2341  FAULT_FLAG_xxx flags 等于Fault was a write access 按位或Fault was mkwrite of existing pte
2343  如果File we map to (can be NULL). IS_SWAPFILE(host)则返回:VM_FAULT_SIGBUS
2347  ret等于page_mkwrite(vmf)
2349  FAULT_FLAG_xxx flags 等于old_flags
2350  如果此条件成立可能性小(为编译器优化)(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))则返回:ret
2352  如果此条件成立可能性小(为编译器优化)(!(ret & VM_FAULT_LOCKED))则
2353  lock_page may only be called if we have the page's inode pinned.
2356  返回:0
2358  ret或等于VM_FAULT_LOCKED
2359  否则VM_BUG_ON_PAGE(!PageLocked(page), page)
2361  返回:ret
调用者
名称描述
wp_page_shared
do_shared_fault