diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index f91926f2f482..8bb8a7ee0f99 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -525,6 +525,7 @@ prototypes: | |||
525 | void (*close)(struct vm_area_struct*); | 525 | void (*close)(struct vm_area_struct*); |
526 | int (*fault)(struct vm_area_struct*, struct vm_fault *); | 526 | int (*fault)(struct vm_area_struct*, struct vm_fault *); |
527 | int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); | 527 | int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); |
528 | int (*pfn_mkwrite)(struct vm_area_struct *, struct vm_fault *); | ||
528 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); | 529 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); |
529 | 530 | ||
530 | locking rules: | 531 | locking rules: |
@@ -534,6 +535,7 @@ close: yes | |||
534 | fault: yes can return with page locked | 535 | fault: yes can return with page locked |
535 | map_pages: yes | 536 | map_pages: yes |
536 | page_mkwrite: yes can return with page locked | 537 | page_mkwrite: yes can return with page locked |
538 | pfn_mkwrite: yes | ||
537 | access: yes | 539 | access: yes |
538 | 540 | ||
539 | ->fault() is called when a previously not present pte is about | 541 | ->fault() is called when a previously not present pte is about |
@@ -560,6 +562,12 @@ the page has been truncated, the filesystem should not look up a new page | |||
560 | like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which | 562 | like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which |
561 | will cause the VM to retry the fault. | 563 | will cause the VM to retry the fault. |
562 | 564 | ||
565 | ->pfn_mkwrite() is the same as page_mkwrite but when the pte is | ||
566 | VM_PFNMAP or VM_MIXEDMAP with a page-less entry. Expected return is | ||
567 | VM_FAULT_NOPAGE. Or one of the VM_FAULT_ERROR types. The default behavior | ||
568 | after this call is to make the pte read-write, unless pfn_mkwrite returns | ||
569 | an error. | ||
570 | |||
563 | ->access() is called when get_user_pages() fails in | 571 | ->access() is called when get_user_pages() fails in |
564 | access_process_vm(), typically used to debug a process through | 572 | access_process_vm(), typically used to debug a process through |
565 | /proc/pid/mem or ptrace. This function is needed only for | 573 | /proc/pid/mem or ptrace. This function is needed only for |