diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-06-11 16:59:07 +0100 |
|---|---|---|
| committer | Vlastimil Babka <vbabka@suse.cz> | 2025-06-18 13:06:26 +0200 |
| commit | 3df29914d9fd1a28ff0630ad5aa8a92abb97543d (patch) | |
| tree | a58494eec310dfd9a98cd37011d4aceae3b368bc /mm/slab.h | |
| parent | c5c44900f4739b14af71875bbd407c81bf576d04 (diff) | |
| download | linux-3df29914d9fd1a28ff0630ad5aa8a92abb97543d.tar.gz linux-3df29914d9fd1a28ff0630ad5aa8a92abb97543d.tar.bz2 linux-3df29914d9fd1a28ff0630ad5aa8a92abb97543d.zip | |
slab: Add SL_pfmemalloc flag
Give slab its own name for this flag. Move the implementation from
slab.h to slub.c since it's only used inside slub.c.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Harry Yoo <harry.yoo@oracle.com>
Link: https://patch.msgid.link/20250611155916.2579160-5-willy@infradead.org
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/slab.h')
| -rw-r--r-- | mm/slab.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/mm/slab.h b/mm/slab.h index 32785ff3470a..248b34c839b7 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -167,30 +167,6 @@ static_assert(IS_ALIGNED(offsetof(struct slab, freelist), sizeof(freelist_aba_t) */ #define slab_page(s) folio_page(slab_folio(s), 0) -/* - * If network-based swap is enabled, sl*b must keep track of whether pages - * were allocated from pfmemalloc reserves. - */ -static inline bool slab_test_pfmemalloc(const struct slab *slab) -{ - return folio_test_active(slab_folio(slab)); -} - -static inline void slab_set_pfmemalloc(struct slab *slab) -{ - folio_set_active(slab_folio(slab)); -} - -static inline void slab_clear_pfmemalloc(struct slab *slab) -{ - folio_clear_active(slab_folio(slab)); -} - -static inline void __slab_clear_pfmemalloc(struct slab *slab) -{ - __folio_clear_active(slab_folio(slab)); -} - static inline void *slab_address(const struct slab *slab) { return folio_address(slab_folio(slab)); |
