mm: Remove folio_test_single

There's no need for this predicate; callers can just use
!folio_test_large().
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
parent 9c325215
...@@ -686,12 +686,6 @@ static inline bool test_set_page_writeback(struct page *page) ...@@ -686,12 +686,6 @@ static inline bool test_set_page_writeback(struct page *page)
__PAGEFLAG(Head, head, PF_ANY) CLEARPAGEFLAG(Head, head, PF_ANY) __PAGEFLAG(Head, head, PF_ANY) CLEARPAGEFLAG(Head, head, PF_ANY)
/* Whether there are one or multiple pages in a folio */
static inline bool folio_test_single(struct folio *folio)
{
return !folio_test_head(folio);
}
/** /**
* folio_test_large() - Does this folio contain more than one page? * folio_test_large() - Does this folio contain more than one page?
* @folio: The folio to test. * @folio: The folio to test.
......
...@@ -670,7 +670,7 @@ bool folio_mapped(struct folio *folio) ...@@ -670,7 +670,7 @@ bool folio_mapped(struct folio *folio)
{ {
long i, nr; long i, nr;
if (folio_test_single(folio)) if (!folio_test_large(folio))
return atomic_read(&folio->_mapcount) >= 0; return atomic_read(&folio->_mapcount) >= 0;
if (atomic_read(folio_mapcount_ptr(folio)) >= 0) if (atomic_read(folio_mapcount_ptr(folio)) >= 0)
return true; return true;
......
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