diff options
author | Matthew Wilcox (Oracle) | 2021-04-12 16:45:17 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) | 2021-09-27 09:27:31 -0400 |
commit | dd10ab049beb479dc83bb14a7b5cd68c363983ce (patch) | |
tree | 954b257996e8d30144667ee4a15f97d1c0a34dad /mm/folio-compat.c | |
parent | 6abbaa5b01730a1f0883d199cf5a90ae5c5dccea (diff) |
mm: Add folio_mapped()
This function is the equivalent of page_mapped(). It is slightly
shorter as we do not need to handle the PageTail() case. Reimplement
page_mapped() as a wrapper around folio_mapped(). folio_mapped()
is 13 bytes smaller than page_mapped(), but the page_mapped() wrapper
is 30 bytes, for a net increase of 17 bytes of text.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Diffstat (limited to 'mm/folio-compat.c')
-rw-r--r-- | mm/folio-compat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/folio-compat.c b/mm/folio-compat.c index 3c83f03b80d7..7044fcc8a8aa 100644 --- a/mm/folio-compat.c +++ b/mm/folio-compat.c @@ -35,3 +35,9 @@ void wait_for_stable_page(struct page *page) return folio_wait_stable(page_folio(page)); } EXPORT_SYMBOL_GPL(wait_for_stable_page); + +bool page_mapped(struct page *page) +{ + return folio_mapped(page_folio(page)); +} +EXPORT_SYMBOL(page_mapped); |