Re: [PATCH v2 03/14] md/raid1: use folio for tmppage
From: Li Nan
Date: Fri Feb 06 2026 - 04:13:22 EST
在 2026/2/5 15:33, Yu Kuai 写道:
Hi,
在 2026/2/5 15:23, Li Nan 写道:
Yeah, should we introduce safe_put_folio()? Or just check NULL here.
Yes, and don't copy implementation. Just convert safe_put_page(page) to
safe_put_folio(page_folio(page)) first.
page cannot be NULL in page_folio(), and the code would be:
if (page)
safe_put_folio(page_folio(page))
This also looks odd. Keeping both functions and removing the page one
after the last reference to it in RAID5 is removed seems better. What do
you think?
--
Thanks,
Nan