Skip to content

Commit

Permalink
mm: remove unused inline functions from include/linux/mm_inline.h
Browse files Browse the repository at this point in the history
Remove the following unused inline functions from mm_inline.h:

1.  All uses of add_page_to_lru_list_tail() have been removed since
   commit 7a3dbfe ("mm/swap: convert lru_deactivate_file to a
   folio_batch"), and it can be replaced by lruvec_add_folio_tail().

2.  All uses of __clear_page_lru_flags() have been removed since commit
   188e8ca ("mm/swap: convert __page_cache_release() to use a
   folio"), and it can be replaced by __folio_clear_lru_flags().

They are useless, so remove them.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Gaosheng Cui <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
gscui authored and akpm00 committed Oct 3, 2022
1 parent 0f633ba commit 6b91e5d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions include/linux/mm_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ static __always_inline void __folio_clear_lru_flags(struct folio *folio)
__folio_clear_unevictable(folio);
}

static __always_inline void __clear_page_lru_flags(struct page *page)
{
__folio_clear_lru_flags(page_folio(page));
}

/**
* folio_lru_list - Which LRU list should a folio be on?
* @folio: The folio to test.
Expand Down Expand Up @@ -348,12 +343,6 @@ void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio)
list_add_tail(&folio->lru, &lruvec->lists[lru]);
}

static __always_inline void add_page_to_lru_list_tail(struct page *page,
struct lruvec *lruvec)
{
lruvec_add_folio_tail(lruvec, page_folio(page));
}

static __always_inline
void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio)
{
Expand Down

0 comments on commit 6b91e5d

Please sign in to comment.