From: Matthew Wilcox (Oracle) Date: Fri, 1 Oct 2021 14:11:16 +0000 (-0400) Subject: mm: Add account_slab() and unaccount_slab() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ba4cda745a5d045d5bcc3ff15ceaaffacd255894;p=users%2Fwilly%2Flinux.git mm: Add account_slab() and unaccount_slab() These functions simply call their page equivalents for now. Signed-off-by: Matthew Wilcox (Oracle) --- diff --git a/mm/slab.h b/mm/slab.h index 54b05f4d9eb5b..305cc8c7fed82 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -510,6 +510,18 @@ static __always_inline void unaccount_slab_page(struct page *page, int order, -(PAGE_SIZE << order)); } +static __always_inline void account_slab(struct slab *slab, int order, + struct kmem_cache *s, gfp_t gfp) +{ + account_slab_page(slab_page(slab), order, s, gfp); +} + +static __always_inline void unaccount_slab(struct slab *slab, int order, + struct kmem_cache *s) +{ + unaccount_slab_page(slab_page(slab), order, s); +} + static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) { struct kmem_cache *cachep;