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