From: Bob Liu Date: Thu, 25 Oct 2012 01:14:48 +0000 (+1100) Subject: thp-clean-up-__collapse_huge_page_isolate v2 X-Git-Tag: next-20121030~1^2~113 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=845de9e633dac9dd79d5ac6cb9f945e5a688db1b;p=karo-tx-linux.git thp-clean-up-__collapse_huge_page_isolate v2 mv label out of condition. Signed-off-by: Bob Liu Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Minchan Kim Cc: Ni zhan Chen Signed-off-by: Andrew Morton --- diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 686df7905736..c6dc442be290 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1868,7 +1868,7 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma, { struct page *page; pte_t *_pte; - int referenced = 0, isolated = 1, none = 0; + int referenced = 0, none = 0; for (_pte = pte; _pte < pte+HPAGE_PMD_NR; _pte++, address += PAGE_SIZE) { pte_t pteval = *_pte; @@ -1917,12 +1917,11 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma, mmu_notifier_test_young(vma->vm_mm, address)) referenced = 1; } - if (unlikely(!referenced)) { + if (likely(referenced)) + return 1; out: - release_pte_pages(pte, _pte); - isolated = 0; - } - return isolated; + release_pte_pages(pte, _pte); + return 0; } static void __collapse_huge_page_copy(pte_t *pte, struct page *page,