Commit 7c7fd825 authored by Naoya Horiguchi's avatar Naoya Horiguchi Committed by Linus Torvalds

mm: hwpoison: remove incorrect comments

dequeue_hwpoisoned_huge_page() can be called without page lock hold, so
let's remove incorrect comment.

The reason why the page lock is not really needed is that
dequeue_hwpoisoned_huge_page() checks page_huge_active() inside
hugetlb_lock, which allows us to avoid trying to dequeue a hugepage that
are just allocated but not linked to active list yet, even without
taking page lock.

Link: http://lkml.kernel.org/r/20160720092901.GA15995@www9186uo.sakura.ne.jpSigned-off-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reported-by: default avatarZhan Chen <zhanc1@andrew.cmu.edu>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 91fd8b95
...@@ -4391,7 +4391,6 @@ follow_huge_pud(struct mm_struct *mm, unsigned long address, ...@@ -4391,7 +4391,6 @@ follow_huge_pud(struct mm_struct *mm, unsigned long address,
/* /*
* This function is called from memory failure code. * This function is called from memory failure code.
* Assume the caller holds page lock of the head page.
*/ */
int dequeue_hwpoisoned_huge_page(struct page *hpage) int dequeue_hwpoisoned_huge_page(struct page *hpage)
{ {
......
...@@ -741,8 +741,6 @@ static int me_huge_page(struct page *p, unsigned long pfn) ...@@ -741,8 +741,6 @@ static int me_huge_page(struct page *p, unsigned long pfn)
* page->lru because it can be used in other hugepage operations, * page->lru because it can be used in other hugepage operations,
* such as __unmap_hugepage_range() and gather_surplus_pages(). * such as __unmap_hugepage_range() and gather_surplus_pages().
* So instead we use page_mapping() and PageAnon(). * So instead we use page_mapping() and PageAnon().
* We assume that this function is called with page lock held,
* so there is no race between isolation and mapping/unmapping.
*/ */
if (!(page_mapping(hpage) || PageAnon(hpage))) { if (!(page_mapping(hpage) || PageAnon(hpage))) {
res = dequeue_hwpoisoned_huge_page(hpage); res = dequeue_hwpoisoned_huge_page(hpage);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment