Re: [RFC PATCH 3/3] fb_defio: do not use deprecated page->mapping, index fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08.01.25 18:32, Matthew Wilcox wrote:
On Wed, Jan 08, 2025 at 04:18:42PM +0000, Lorenzo Stoakes wrote:
@@ -280,7 +269,10 @@ static void fb_deferred_io_work(struct work_struct *work)
  		struct folio *folio = page_folio(pageref->page);
folio_lock(folio);
-		folio_mkclean(folio);
+		rmap_wrprotect_file_page(fbdefio->mapping,
+					 pageref->offset >> PAGE_SHIFT,
+					 compound_nr(pageref->page),
+					 page_to_pfn(pageref->page));
  		folio_unlock(folio);

Why do we need to lock the folio?  (since this isn't necessarily a
folio)

Can you clarify the "since this isn't necessarily a folio" part ? Do you mean in the future, when we split "struct page" and "struct folio"?

Doing an rmap walk on something that won't be a folio is ... sounds odd (->wrong :) )

--
Cheers,

David / dhildenb




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux