mm: Remove page_cache_add_speculative() and page_cache_get_speculative()

These wrappers have no more callers, so delete them.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarWilliam Kucharski <william.kucharski@oracle.com>
parent 5fec0719
...@@ -1215,10 +1215,9 @@ static inline void put_page(struct page *page) ...@@ -1215,10 +1215,9 @@ static inline void put_page(struct page *page)
* applications that don't have huge page reference counts, this won't be an * applications that don't have huge page reference counts, this won't be an
* issue. * issue.
* *
* Locking: the lockless algorithm described in page_cache_get_speculative() * Locking: the lockless algorithm described in folio_try_get_rcu()
* and page_cache_gup_pin_speculative() provides safe operation for * provides safe operation for get_user_pages(), page_mkclean() and
* get_user_pages and page_mkclean and other calls that race to set up page * other calls that race to set up page table entries.
* table entries.
*/ */
#define GUP_PIN_COUNTING_BIAS (1U << 10) #define GUP_PIN_COUNTING_BIAS (1U << 10)
......
...@@ -283,16 +283,6 @@ static inline struct inode *folio_inode(struct folio *folio) ...@@ -283,16 +283,6 @@ static inline struct inode *folio_inode(struct folio *folio)
return folio->mapping->host; return folio->mapping->host;
} }
static inline bool page_cache_add_speculative(struct page *page, int count)
{
return folio_ref_try_add_rcu((struct folio *)page, count);
}
static inline bool page_cache_get_speculative(struct page *page)
{
return page_cache_add_speculative(page, 1);
}
/** /**
* folio_attach_private - Attach private data to a folio. * folio_attach_private - Attach private data to a folio.
* @folio: Folio to attach data to. * @folio: Folio to attach data to.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment