• Kirill A. Shutemov's avatar
    mm/page_alloc.c: drop dead destroy_compound_page() · 6e9f0d58
    Kirill A. Shutemov authored
    
    
    The only caller is __free_one_page(). By the time we should have
    page->flags to be cleared already:
    
     - for 0-order pages though PCP list:
    	free_hot_cold_page()
    		free_pages_prepare()
    			free_pages_check()
    				page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
    		<put the page to PCP list>
    
    	free_pcppages_bulk()
    		page = <withdraw pages from PCP list>
    		__free_one_page(page)
    
     - for non-0-order pages:
    	__free_pages_ok()
    		free_pages_prepare()
    			free_pages_check()
    				page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
    		free_one_page()
    			__free_one_page()
    
    So there's no way PageCompound() will return true in __free_one_page().
    Let's remove dead destroy_compound_page() and put assert for page->flags
    there instead.
    Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    6e9f0d58
page_alloc.c 181 KB