Re: [PATCH 4/6] mm/page_io: rename bio_associate_blkg_from_page()

Tal Zussman <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.mm
Message-ID <[email protected]>
On 8/7/26 2:56 PM, Matthew Wilcox wrote:
> On Thu, Aug 06, 2026 at 06:55:36PM -0400, Tal Zussman wrote:
>> This function takes a folio. Rename it to
>> bio_associate_blkg_from_folio() accordingly. While at it, convert the
>> macro in the !CONFIG_MEMCG || !CONFIG_BLK_CGROUP case to a function.
>> 
>> Signed-off-by: Tal Zussman <[email protected]>
> 
> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>
> 
>> -static void bio_associate_blkg_from_page(struct bio *bio, struct folio *folio)
>> +static void bio_associate_blkg_from_folio(struct bio *bio, struct folio *folio)
> 
> It's s shame this isn't const-qualified (after all, we don't modify the folio).
> That needs folio_memcg_charged() to take a const folio pointer, which it
> could.  And folio_memcg_blkg_css() and folio_memcg().  That's a followup
> patch though.
> 

I had the same thought when looking at this and went all the way down the
callchain to dump_page(). I didn't want to flood the list with patches, but
happy to send a couple follow-up patches once this is in mm-new.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.