diff options
| author | Matthew Wilcox (Oracle) <[email protected]> | 2020-06-03 16:01:09 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-06-03 20:09:47 -0700 |
| commit | ff45fc3ca0f3c38e752d75f71b8d8efcf409e42d (patch) | |
| tree | 0292da2a5339e202658028ead79cf4f2bb791749 /include/linux | |
| parent | 5be993432821750f382809df5e20bf4c129b24f7 (diff) | |
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) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 32f3c17715ac..ff73187c3fd4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -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) |