mm: remove page_ref_sub_return()
With all callers converted to folios, we can act directly on folio->_refcount. Link: https://lkml.kernel.org/r/20240424191914.361554-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
53e45c4f6d
commit
498aefbc69
@ -139,18 +139,13 @@ static inline void folio_ref_sub(struct folio *folio, int nr)
|
||||
page_ref_sub(&folio->page, nr);
|
||||
}
|
||||
|
||||
static inline int page_ref_sub_return(struct page *page, int nr)
|
||||
{
|
||||
int ret = atomic_sub_return(nr, &page->_refcount);
|
||||
|
||||
if (page_ref_tracepoint_active(page_ref_mod_and_return))
|
||||
__page_ref_mod_and_return(page, -nr, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int folio_ref_sub_return(struct folio *folio, int nr)
|
||||
{
|
||||
return page_ref_sub_return(&folio->page, nr);
|
||||
int ret = atomic_sub_return(nr, &folio->_refcount);
|
||||
|
||||
if (page_ref_tracepoint_active(page_ref_mod_and_return))
|
||||
__page_ref_mod_and_return(&folio->page, -nr, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void page_ref_inc(struct page *page)
|
||||
|
Loading…
Reference in New Issue
Block a user