mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
mm/hugetlb_cgroup: convert set_hugetlb_cgroup*() to folios
Allows __prep_new_huge_page() to operate on a folio by converting set_hugetlb_cgroup*() to take in a folio. Link: https://lkml.kernel.org/r/20221101223059.460937-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Bui Quang Minh <minhquangbui99@gmail.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Miaohe Lin <linmiaohe@huawei.com> Cc: Mina Almasry <almasrymina@google.com> Cc: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
f074732d59
commit
de656ed376
@@ -112,16 +112,16 @@ static inline void __set_hugetlb_cgroup(struct folio *folio,
|
||||
(unsigned long)h_cg);
|
||||
}
|
||||
|
||||
static inline void set_hugetlb_cgroup(struct page *page,
|
||||
static inline void set_hugetlb_cgroup(struct folio *folio,
|
||||
struct hugetlb_cgroup *h_cg)
|
||||
{
|
||||
__set_hugetlb_cgroup(page_folio(page), h_cg, false);
|
||||
__set_hugetlb_cgroup(folio, h_cg, false);
|
||||
}
|
||||
|
||||
static inline void set_hugetlb_cgroup_rsvd(struct page *page,
|
||||
static inline void set_hugetlb_cgroup_rsvd(struct folio *folio,
|
||||
struct hugetlb_cgroup *h_cg)
|
||||
{
|
||||
__set_hugetlb_cgroup(page_folio(page), h_cg, true);
|
||||
__set_hugetlb_cgroup(folio, h_cg, true);
|
||||
}
|
||||
|
||||
static inline bool hugetlb_cgroup_disabled(void)
|
||||
@@ -199,12 +199,12 @@ hugetlb_cgroup_from_folio_rsvd(struct folio *folio)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void set_hugetlb_cgroup(struct page *page,
|
||||
static inline void set_hugetlb_cgroup(struct folio *folio,
|
||||
struct hugetlb_cgroup *h_cg)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void set_hugetlb_cgroup_rsvd(struct page *page,
|
||||
static inline void set_hugetlb_cgroup_rsvd(struct folio *folio,
|
||||
struct hugetlb_cgroup *h_cg)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user