Commit 645b1399 authored by Kefeng Wang's avatar Kefeng Wang Committed by Andrew Morton

fb_defio: use a folio in fb_deferred_io_work()

Replaces three calls to compound_head() with one, which removes last
caller of page_mkclean().

Link: https://lkml.kernel.org/r/20240604114822.2089819-4-wangkefeng.wang@huawei.comSigned-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Helge Deller <deller@gmx.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 2669324b
...@@ -244,10 +244,11 @@ static void fb_deferred_io_work(struct work_struct *work) ...@@ -244,10 +244,11 @@ static void fb_deferred_io_work(struct work_struct *work)
/* here we mkclean the pages, then do all deferred IO */ /* here we mkclean the pages, then do all deferred IO */
mutex_lock(&fbdefio->lock); mutex_lock(&fbdefio->lock);
list_for_each_entry(pageref, &fbdefio->pagereflist, list) { list_for_each_entry(pageref, &fbdefio->pagereflist, list) {
struct page *cur = pageref->page; struct folio *folio = page_folio(pageref->page);
lock_page(cur);
page_mkclean(cur); folio_lock(folio);
unlock_page(cur); folio_mkclean(folio);
folio_unlock(folio);
} }
/* driver's callback with pagereflist */ /* driver's callback with pagereflist */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment