diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2014-12-18 19:17:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-18 22:08:11 -0500 |
commit | d82fa87d2b60e8affea3b244ad23c5d9a59c584a (patch) | |
tree | e989c53dc22e9adc967880171c805df3a85048aa /mm/memory.c | |
parent | 48332f28461c72af4b98611e0b4f02d769b8cc70 (diff) |
mm/memory.c:do_shared_fault(): add comment
Belatedly document the changes in commit f0c6d4d295e4 ("mm: introduce
do_shared_fault() and drop do_fault()").
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Bob Liu <lliubbo@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index 6efe36a998ba..d8aebc52265f 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2996,6 +2996,12 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2996 | 2996 | ||
2997 | if (set_page_dirty(fault_page)) | 2997 | if (set_page_dirty(fault_page)) |
2998 | dirtied = 1; | 2998 | dirtied = 1; |
2999 | /* | ||
3000 | * Take a local copy of the address_space - page.mapping may be zeroed | ||
3001 | * by truncate after unlock_page(). The address_space itself remains | ||
3002 | * pinned by vma->vm_file's reference. We rely on unlock_page()'s | ||
3003 | * release semantics to prevent the compiler from undoing this copying. | ||
3004 | */ | ||
2999 | mapping = fault_page->mapping; | 3005 | mapping = fault_page->mapping; |
3000 | unlock_page(fault_page); | 3006 | unlock_page(fault_page); |
3001 | if ((dirtied || vma->vm_ops->page_mkwrite) && mapping) { | 3007 | if ((dirtied || vma->vm_ops->page_mkwrite) && mapping) { |