函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_shared_fault

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

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
3708  vma等于Target VMA
3711  ret等于The mmap_sem must have been held on entry, and may have been* released depending on flags and vma->vm_ops->fault() return value.* See filemap_fault() and __lock_page_retry().
3712  如果此条件成立可能性小(为编译器优化)(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY))则返回:ret
3719  如果page_mkwrite
3720  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.
3721  tmp等于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.
3725  返回:tmp
3729  ret或等于sh_fault - finish page fault once we have prepared the page to fault*@vmf: structure describing the fault* This function handles all that is needed to finish a page fault once the* page to fault in is prepared
3730  如果此条件成立可能性小(为编译器优化)(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY))则
3732  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.
3733  put_page(->fault handlers should return a* page here, unless VM_FAULT_NOPAGE* is set (which is also implied by* VM_FAULT_ERROR).)
3734  返回:ret
3737  ret或等于Handle dirtying of a page in shared file mapping on a write fault.* The function expects the page to be locked and unlocks it.
3738  返回:ret
调用者
名称描述
do_faultWe enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults)