mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 13:57:54 -04:00
memcg: convert get_obj_cgroup_from_page to get_obj_cgroup_from_folio
As the one caller now has a folio, pass it in and use it. Removes three calls to compound_head(). Link: https://lkml.kernel.org/r/20230715042343.434588-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Vitaly Wool <vitaly.wool@konsulko.com> Cc: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
34f4c198bf
commit
074e3e262a
@@ -1759,7 +1759,7 @@ int __memcg_kmem_charge_page(struct page *page, gfp_t gfp, int order);
|
||||
void __memcg_kmem_uncharge_page(struct page *page, int order);
|
||||
|
||||
struct obj_cgroup *get_obj_cgroup_from_current(void);
|
||||
struct obj_cgroup *get_obj_cgroup_from_page(struct page *page);
|
||||
struct obj_cgroup *get_obj_cgroup_from_folio(struct folio *folio);
|
||||
|
||||
int obj_cgroup_charge(struct obj_cgroup *objcg, gfp_t gfp, size_t size);
|
||||
void obj_cgroup_uncharge(struct obj_cgroup *objcg, size_t size);
|
||||
@@ -1843,7 +1843,7 @@ static inline void __memcg_kmem_uncharge_page(struct page *page, int order)
|
||||
{
|
||||
}
|
||||
|
||||
static inline struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
|
||||
static inline struct obj_cgroup *get_obj_cgroup_from_folio(struct folio *folio)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user