Skip to content

Commit

Permalink
mm: remove set_compound_page_dtor()
Browse files Browse the repository at this point in the history
All users can use the folio equivalent so this function can be safely
removed.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Sidhartha Kumar <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Tarun Sahu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
sidkumar99 authored and akpm00 committed Jun 19, 2023
1 parent a92cbb8 commit b95826c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1223,16 +1223,6 @@ enum compound_dtor_id {
};
extern compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS];

static inline void set_compound_page_dtor(struct page *page,
enum compound_dtor_id compound_dtor)
{
struct folio *folio = (struct folio *)page;

VM_BUG_ON_PAGE(compound_dtor >= NR_COMPOUND_DTORS, page);
VM_BUG_ON_PAGE(!PageHead(page), page);
folio->_folio_dtor = compound_dtor;
}

static inline void folio_set_compound_dtor(struct folio *folio,
enum compound_dtor_id compound_dtor)
{
Expand Down
2 changes: 1 addition & 1 deletion mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ void prep_transhuge_page(struct page *page)

VM_BUG_ON_FOLIO(folio_order(folio) < 2, folio);
INIT_LIST_HEAD(&folio->_deferred_list);
set_compound_page_dtor(page, TRANSHUGE_PAGE_DTOR);
folio_set_compound_dtor(folio, TRANSHUGE_PAGE_DTOR);
}

static inline bool is_transparent_hugepage(struct page *page)
Expand Down
2 changes: 1 addition & 1 deletion mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static inline void prep_compound_head(struct page *page, unsigned int order)
{
struct folio *folio = (struct folio *)page;

set_compound_page_dtor(page, COMPOUND_PAGE_DTOR);
folio_set_compound_dtor(folio, COMPOUND_PAGE_DTOR);
set_compound_order(page, order);
atomic_set(&folio->_entire_mapcount, -1);
atomic_set(&folio->_nr_pages_mapped, 0);
Expand Down

0 comments on commit b95826c

Please sign in to comment.