diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 13:13:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 13:13:10 -0400 |
commit | f1ebdd60cc73ed36fd977f7e719ce70d2f5cd1c0 (patch) | |
tree | 225cb2ea2c0f8990f29383058a07206cfd835893 /mm/rmap.c | |
parent | f99d055398d53c8f769d5153b3fdce1d2556e7ff (diff) | |
parent | 46e387bbd82d438b9131e237e6e2cb55a825da49 (diff) |
Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6
* 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (22 commits)
Add _addr_lsb field to ia64 siginfo
Fix migration.c compilation on s390
HWPOISON: Remove retry loop for try_to_unmap
HWPOISON: Turn addr_valid from bitfield into char
HWPOISON: Disable DEBUG by default
HWPOISON: Convert pr_debugs to pr_info
HWPOISON: Improve comments in memory-failure.c
x86: HWPOISON: Report correct address granuality for huge hwpoison faults
Encode huge page size for VM_FAULT_HWPOISON errors
Fix build error with !CONFIG_MIGRATION
hugepage: move is_hugepage_on_freelist inside ifdef to avoid warning
Clean up __page_set_anon_rmap
HWPOISON, hugetlb: fix unpoison for hugepage
HWPOISON, hugetlb: soft offlining for hugepage
HWPOSION, hugetlb: recover from free hugepage error when !MF_COUNT_INCREASED
hugetlb: move refcounting in hugepage allocation inside hugetlb_lock
HWPOISON, hugetlb: add free check to dequeue_hwpoison_huge_page()
hugetlb: hugepage migration core
hugetlb: redefine hugepage copy functions
hugetlb: add allocate function for hugepage migration
...
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 25 |
1 files changed, 8 insertions, 17 deletions
@@ -780,10 +780,10 @@ void page_move_anon_rmap(struct page *page, | |||
780 | } | 780 | } |
781 | 781 | ||
782 | /** | 782 | /** |
783 | * __page_set_anon_rmap - setup new anonymous rmap | 783 | * __page_set_anon_rmap - set up new anonymous rmap |
784 | * @page: the page to add the mapping to | 784 | * @page: Page to add to rmap |
785 | * @vma: the vm area in which the mapping is added | 785 | * @vma: VM area to add page to. |
786 | * @address: the user virtual address mapped | 786 | * @address: User virtual address of the mapping |
787 | * @exclusive: the page is exclusively owned by the current process | 787 | * @exclusive: the page is exclusively owned by the current process |
788 | */ | 788 | */ |
789 | static void __page_set_anon_rmap(struct page *page, | 789 | static void __page_set_anon_rmap(struct page *page, |
@@ -793,25 +793,16 @@ static void __page_set_anon_rmap(struct page *page, | |||
793 | 793 | ||
794 | BUG_ON(!anon_vma); | 794 | BUG_ON(!anon_vma); |
795 | 795 | ||
796 | if (PageAnon(page)) | ||
797 | return; | ||
798 | |||
796 | /* | 799 | /* |
797 | * If the page isn't exclusively mapped into this vma, | 800 | * If the page isn't exclusively mapped into this vma, |
798 | * we must use the _oldest_ possible anon_vma for the | 801 | * we must use the _oldest_ possible anon_vma for the |
799 | * page mapping! | 802 | * page mapping! |
800 | */ | 803 | */ |
801 | if (!exclusive) { | 804 | if (!exclusive) |
802 | if (PageAnon(page)) | ||
803 | return; | ||
804 | anon_vma = anon_vma->root; | 805 | anon_vma = anon_vma->root; |
805 | } else { | ||
806 | /* | ||
807 | * In this case, swapped-out-but-not-discarded swap-cache | ||
808 | * is remapped. So, no need to update page->mapping here. | ||
809 | * We convice anon_vma poitned by page->mapping is not obsolete | ||
810 | * because vma->anon_vma is necessary to be a family of it. | ||
811 | */ | ||
812 | if (PageAnon(page)) | ||
813 | return; | ||
814 | } | ||
815 | 806 | ||
816 | anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON; | 807 | anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON; |
817 | page->mapping = (struct address_space *) anon_vma; | 808 | page->mapping = (struct address_space *) anon_vma; |