projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da08e9b
)
mm: add folio_mapping_flags()
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Fri, 13 May 2022 03:23:05 +0000
(20:23 -0700)
committer
Andrew Morton
<akpm@linux-foundation.org>
Fri, 13 May 2022 14:20:17 +0000
(07:20 -0700)
This is the equivalent of PageMappingFlags and is needed for converting
mm/migrate.c to folios.
Link:
https://lkml.kernel.org/r/20220504182857.4013401-25-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/page-flags.h
patch
|
blob
|
history
diff --git
a/include/linux/page-flags.h
b/include/linux/page-flags.h
index
b70124b
..
97eb88d
100644
(file)
--- a/
include/linux/page-flags.h
+++ b/
include/linux/page-flags.h
@@
-650,6
+650,11
@@
__PAGEFLAG(Reported, reported, PF_NO_COMPOUND)
#define PAGE_MAPPING_KSM (PAGE_MAPPING_ANON | PAGE_MAPPING_MOVABLE)
#define PAGE_MAPPING_FLAGS (PAGE_MAPPING_ANON | PAGE_MAPPING_MOVABLE)
+static __always_inline bool folio_mapping_flags(struct folio *folio)
+{
+ return ((unsigned long)folio->mapping & PAGE_MAPPING_FLAGS) != 0;
+}
+
static __always_inline int PageMappingFlags(struct page *page)
{
return ((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) != 0;