table of contents
- stretch 4.9.168-1
FILEMAP_FAULT(9) | Memory Management in Linux | FILEMAP_FAULT(9) |
NAME¶
filemap_fault - read in file data for page fault handlingSYNOPSIS¶
int filemap_fault(struct vm_area_struct * vma, struct vm_fault * vmf);
ARGUMENTS¶
vmavmf
DESCRIPTION¶
filemap_fault is invoked via the vma operations vector for a mapped memory region to read in file data during a page fault.The goto's are kind of ugly, but this streamlines the normal case of having it in the page cache, and handles the special cases reasonably without having a lot of duplicated code.
vma->vm_mm->mmap_sem must be held on entry.
If our return value has VM_FAULT_RETRY set, it's because lock_page_or_retry returned 0. The mmap_sem has usually been released in this case. See __lock_page_or_retry for the exception.
If our return value does not have VM_FAULT_RETRY set, the mmap_sem has not been released.
We never return with VM_FAULT_RETRY and a bit from VM_FAULT_ERROR set.
COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |