mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
mm: simplify calling a compound page destructor
None of the three callers of get_compound_page_dtor() want to know the value; they just want to call the function. Replace it with destroy_compound_page() which calls the dtor for them. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Link: http://lkml.kernel.org/r/20200517105051.9352-1-willy@infradead.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
5be9934328
commit
ff45fc3ca0
@@ -876,10 +876,10 @@ static inline void set_compound_page_dtor(struct page *page,
|
||||
page[1].compound_dtor = compound_dtor;
|
||||
}
|
||||
|
||||
static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
|
||||
static inline void destroy_compound_page(struct page *page)
|
||||
{
|
||||
VM_BUG_ON_PAGE(page[1].compound_dtor >= NR_COMPOUND_DTORS, page);
|
||||
return compound_page_dtors[page[1].compound_dtor];
|
||||
compound_page_dtors[page[1].compound_dtor](page);
|
||||
}
|
||||
|
||||
static inline unsigned int compound_order(struct page *page)
|
||||
|
Reference in New Issue
Block a user