Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-28 14:41:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static vm_fault_t do_page_mkwrite(struct vm_fault *vmf)

Type:vm_fault_t

Parameter:

TypeParameterName
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  If File we map to (can be NULL). && IS_SWAPFILE(host) Then Return VM_FAULT_SIGBUS
2347  ret = page_mkwrite(vmf)
2349  FAULT_FLAG_xxx flags = old_flags
2350  If Value for the false possibility is greater at compile time(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE)) Then Return ret
2352  If Value for the false possibility is greater at compile time(!(ret & VM_FAULT_LOCKED)) Then
2353  lock_page may only be called if we have the page's inode pinned.
2356  Return 0
2358  ret |= VM_FAULT_LOCKED
2359  Else VM_BUG_ON_PAGE(!PageLocked(page), page)
2361  Return ret
Caller
NameDescribe
wp_page_shared
do_shared_fault