diff options
author | Matthew Wilcox (Oracle) | 2024-05-31 13:29:02 +0100 |
---|---|---|
committer | Vlastimil Babka | 2024-05-31 15:51:10 +0200 |
commit | 4d2bcefa965b06a1f2be6912456bcfa86a34f184 (patch) | |
tree | e94748013e551b80d29658818554bf089c5ea66b /mm/slab.h | |
parent | a0a44d9175b349df2462089140fb7f292100bd7c (diff) |
mm: Reduce the number of slab->folio casts
Mark a few more folio functions as taking a const folio pointer, which
allows us to remove a few places in slab which cast away the const.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/slab.h')
-rw-r--r-- | mm/slab.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slab.h b/mm/slab.h index 5f8f47c5bee0..b16e63191578 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -166,7 +166,7 @@ static_assert(IS_ALIGNED(offsetof(struct slab, freelist), sizeof(freelist_aba_t) */ static inline bool slab_test_pfmemalloc(const struct slab *slab) { - return folio_test_active((struct folio *)slab_folio(slab)); + return folio_test_active(slab_folio(slab)); } static inline void slab_set_pfmemalloc(struct slab *slab) @@ -211,7 +211,7 @@ static inline struct slab *virt_to_slab(const void *addr) static inline int slab_order(const struct slab *slab) { - return folio_order((struct folio *)slab_folio(slab)); + return folio_order(slab_folio(slab)); } static inline size_t slab_size(const struct slab *slab) |