On Thu, Mar 13, 2025 at 02:58:50PM +0000, Matthew Wilcox (Oracle) wrote: > Folios always use memcg_data to refer to the mem_cgroup while pages > allocated with GFP_ACCOUNT have a pointer to the obj_cgroup. Since the > caller already knows what it has, split the function into two and then > we don't need to check. > > Move the assignment of split folio memcg_data to the point where we set > up the other parts of the new folio. That leaves folio_split_memcg() > just handling the memcg accounting. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Acked-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>