diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2024-06-04 14:48:21 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-07-04 05:30:17 +0300 |
commit | 645b1399fa67baff565fa82c48976c53822a393f (patch) | |
tree | a66f054574650a30a09ec47f901e629c243ac328 /drivers/video/fbdev/core | |
parent | 2669324b81e5f67d409d3ad988da77c7c2a09045 (diff) | |
download | linux-645b1399fa67baff565fa82c48976c53822a393f.tar.xz |
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.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: David 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: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/video/fbdev/core')
-rw-r--r-- | drivers/video/fbdev/core/fb_defio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index 806ecd32219b..c9c8e294b7e7 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -244,10 +244,11 @@ static void fb_deferred_io_work(struct work_struct *work) /* here we mkclean the pages, then do all deferred IO */ mutex_lock(&fbdefio->lock); list_for_each_entry(pageref, &fbdefio->pagereflist, list) { - struct page *cur = pageref->page; - lock_page(cur); - page_mkclean(cur); - unlock_page(cur); + struct folio *folio = page_folio(pageref->page); + + folio_lock(folio); + folio_mkclean(folio); + folio_unlock(folio); } /* driver's callback with pagereflist */ |