From patchwork Tue Jun 4 11:48:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13685097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EE29C25B78 for ; Tue, 4 Jun 2024 11:49:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1A7636B00B9; Tue, 4 Jun 2024 07:49:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F19CB6B00BB; Tue, 4 Jun 2024 07:49:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C7C9E6B00B6; Tue, 4 Jun 2024 07:49:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 5142B6B00BA for ; Tue, 4 Jun 2024 07:49:06 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F0B53A1A42 for ; Tue, 4 Jun 2024 11:49:05 +0000 (UTC) X-FDA: 82193035050.21.A27B5AA Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf20.hostedemail.com (Postfix) with ESMTP id 8C2011C0023 for ; Tue, 4 Jun 2024 11:49:03 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; spf=pass (imf20.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717501744; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QGKTk6InMfm56/Z1256R73pc/ry75YimMkrtNyydyLw=; b=OnXmXCXu9RXUsamNiNrieGXlN6WDdeIbAkWjdOq8ZyKRGTPjhvdTQ1Skrj6uLYn2i+pKyw wwUPEHYtHTci139FCtt1vdf81Ds9+oO1RfViyQtF26p44fM43WeMBu+Pc+yTz1fgVSoEoh 7XNfEUNLrOF5WFYOFHZNF5RNWecQ9c8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; spf=pass (imf20.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717501744; a=rsa-sha256; cv=none; b=ZhCCEiGawo+g30hPUHyVGysoU773DmSUmGi4dWT0OtSduI5YsgD0kpsHqzIk1o3F/D3VqI WutVLLZv5NBdAuhN4hX0SH8gqpZ7FOzcsZFccsWytIGie6rxc/zhZqRO+unat1SEwozalD Ufb721ATdAo6rbRlkseESiN+IVPOqjE= Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Vtpg43mZKz1S9Kw; Tue, 4 Jun 2024 19:45:04 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id B95A814022E; Tue, 4 Jun 2024 19:48:59 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 4 Jun 2024 19:48:59 +0800 From: Kefeng Wang To: Andrew Morton CC: Helge Deller , Daniel Vetter , David Hildenbrand , Matthew Wilcox , , Jonathan Corbet , Kefeng Wang Subject: [PATCH 3/4] fb_defio: use a folio in fb_deferred_io_work() Date: Tue, 4 Jun 2024 19:48:21 +0800 Message-ID: <20240604114822.2089819-4-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240604114822.2089819-1-wangkefeng.wang@huawei.com> References: <20240604114822.2089819-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 8C2011C0023 X-Stat-Signature: xu937gquingw9b7a666oa6wxdifdqfcf X-HE-Tag: 1717501743-913650 X-HE-Meta: U2FsdGVkX1+7ssUXQPhw/1oQt6oEFglpAOlHUq8ZduSpDHzcvZZ7GAvBbzRlcB6K5mQcamPSP3MKnvrukWdxf81V8EVA60Y6f2lYMikkdYS3efLqwI+8x2YkyzpqmjkPlvHCIF7ltqrTf/xfkSiBqXJrCVmdFsooogi3YyLXCPJeKYvjB4+YG6TQ/v7U3b/7PsjuojpKWBpHsHV1CnS5cYXPC9YF6Jms23o5oNgaVIk+loDgJkycOabq0jWENo1JRwPve5E2L63DRIMn+Ug54muC/ohmb+2/bpZoR1Dve80EgxhYNGUj7pbzgBjvfrgsdMSIYcgjcMt0zJvvwANikUVFoX8ZYrVnf3KzROoOqEpTegSpuE8nSY37WS5u/eizBOf6cQVyRXYqBJpRwUECrXNc9WWOnbOetHv64pFlqH4/mT2KTefaeA+i0aZ+w2XoFGljM0V65CYSw7FRC4Hjgb1cYqbV9uAOgKQBg0CbM7X5axL7TtxCJWDvocKSriHgQ0QI/wfSjr6q/B5u5Y8EmlsMu6dtyjSUyidXsEN+fzYWnXqVvmwJcJdLgGGN8HfC2p3bchH7iBK2OELVRKUvQFr7c4d72qoL3gXoLUY1Vbp6bQtxNdNjHhL8DqIjfYjlSlbXdObLVoo7MMr6Wd1Vl6GU5OJWVrvLE6BXL2bBNGW+vx8fgd8XWnB/+c4M+RSinYiiddCjUI5hWGwMZVtEncPDxRWgVdzZhe2ygh+/+yx2HTNDOdDgRaWiRkzhiZKaCmbxStauQsXjvM50EaXObOo8vxpaSlat5XsWdQWWm7Oa9nOfWL2GAI6mdi2TTO4uc3sAREUmw81P1dhUYESwnWvZMTBFPW9tTJdw6Txi743GsictYw0Igbpug6xY2cDR07Tg7WDAcZgbsyW9tiWaaSQ3lFbXGHDjPr/B1gw2KmEznvwpn1w4X5z44N+9xTqOXA8FVm2FjCao+rR9ACc d+6e3rrG //8lVgcT0XhUu7Lvq0pRcWcBuopcbZgVx1qV6/ALemKZN8BExBqgXPagNbqaPHPhnYB2PRIlZbN8NFrnUVaBuuE/Oa6XeoagYwc2hTQDKBzHmAijPh9Zqeynpo5dQ8cx90MltnB8/i6pS7sKaIdiDHBuWvKK6osG3+YhHwA+Wurv+XuggBJLNAqjUS4PkeFnQELCw X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Replaces three calls to compound_head() with one, which removes last caller of page_mkclean(). Signed-off-by: Kefeng Wang Acked-by: David Hildenbrand --- drivers/video/fbdev/core/fb_defio.c | 9 +++++---- 1 file 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 */