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
876876 page[1].compound_dtor = compound_dtor;
877877 }
878878
879−static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
879+static inline void destroy_compound_page(struct page *page)
880880 {
881881 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);
883883 }
884884
885885 static inline unsigned int compound_order(struct page *page)