History

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.

Matthew Wilcox (Oracle) committed 6 years ago

Commit ff45fc31 parent 5be99343 files · +5 −8Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/mm.h+2−2
@@ -876,10 +876,10 @@ static inline void set_compound_page_dtor(struct page *page, · 875 unmodified lines
876 page[1].compound_dtor = compound_dtor;876 page[1].compound_dtor = compound_dtor;
877}877}
878 878
879static inline compound_page_dtor *get_compound_page_dtor(struct page *page)879static inline void destroy_compound_page(struct page *page)
880{880{
881 VM_BUG_ON_PAGE(page[1].compound_dtor >= NR_COMPOUND_DTORS, page);881 VM_BUG_ON_PAGE(page[1].compound_dtor >= NR_COMPOUND_DTORS, page);
882 return compound_page_dtors[page[1].compound_dtor];882 compound_page_dtors[page[1].compound_dtor](page);
883}883}
884 884
885static inline unsigned int compound_order(struct page *page)885static inline unsigned int compound_order(struct page *page)