[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z362xoQMxQRxYUlJ@casper.infradead.org>
Date: Wed, 8 Jan 2025 17:32:54 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Jaya Kumar <jayalk@...works.biz>, Simona Vetter <simona@...ll.ch>,
Helge Deller <deller@....de>, linux-fbdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, David Hildenbrand <david@...hat.com>
Subject: Re: [RFC PATCH 3/3] fb_defio: do not use deprecated page->mapping,
index fields
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) Also, do we need compound_nr() here? I _think_ for defio,
the number of pages allocated per object are fixed, so this should be
an fbdefio->nr_pages field?
(something that's always troubled me about compound_nr() is that it
returns 1 for tail pages and the number you actually expect for head
pages)
Powered by blists - more mailing lists