mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
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 ...
This commit is contained in:
commit
f1ebdd60cc
13 changed files with 596 additions and 167 deletions
25
mm/rmap.c
25
mm/rmap.c
|
@ -780,10 +780,10 @@ void page_move_anon_rmap(struct page *page,
|
|||
}
|
||||
|
||||
/**
|
||||
* __page_set_anon_rmap - setup new anonymous rmap
|
||||
* @page: the page to add the mapping to
|
||||
* @vma: the vm area in which the mapping is added
|
||||
* @address: the user virtual address mapped
|
||||
* __page_set_anon_rmap - set up new anonymous rmap
|
||||
* @page: Page to add to rmap
|
||||
* @vma: VM area to add page to.
|
||||
* @address: User virtual address of the mapping
|
||||
* @exclusive: the page is exclusively owned by the current process
|
||||
*/
|
||||
static void __page_set_anon_rmap(struct page *page,
|
||||
|
@ -793,25 +793,16 @@ static void __page_set_anon_rmap(struct page *page,
|
|||
|
||||
BUG_ON(!anon_vma);
|
||||
|
||||
if (PageAnon(page))
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the page isn't exclusively mapped into this vma,
|
||||
* we must use the _oldest_ possible anon_vma for the
|
||||
* page mapping!
|
||||
*/
|
||||
if (!exclusive) {
|
||||
if (PageAnon(page))
|
||||
return;
|
||||
if (!exclusive)
|
||||
anon_vma = anon_vma->root;
|
||||
} else {
|
||||
/*
|
||||
* In this case, swapped-out-but-not-discarded swap-cache
|
||||
* is remapped. So, no need to update page->mapping here.
|
||||
* We convice anon_vma poitned by page->mapping is not obsolete
|
||||
* because vma->anon_vma is necessary to be a family of it.
|
||||
*/
|
||||
if (PageAnon(page))
|
||||
return;
|
||||
}
|
||||
|
||||
anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON;
|
||||
page->mapping = (struct address_space *) anon_vma;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue