From: Bob Liu Date: Sat, 3 Nov 2012 00:42:13 +0000 (+1100) Subject: thp-clean-up-__collapse_huge_page_isolate v2 X-Git-Tag: next-20121107~2^2~183 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e313947b1f25182e94dc7cbeb263cd92e26805af;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 38fb9b1662e6..36bed8342bd6 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1853,7 +1853,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; @@ -1902,12 +1902,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,