From patchwork Wed Apr 2 15:00:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 14036136 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 035CFC28B20 for ; Wed, 2 Apr 2025 15:00:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF812280008; Wed, 2 Apr 2025 11:00:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AA829280009; Wed, 2 Apr 2025 11:00:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A8AF280008; Wed, 2 Apr 2025 11:00:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6B34E280007 for ; Wed, 2 Apr 2025 11:00:11 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 900AABB5B5 for ; Wed, 2 Apr 2025 15:00:11 +0000 (UTC) X-FDA: 83289414222.04.22716E3 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP id 4C1B11A0016 for ; Wed, 2 Apr 2025 15:00:09 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=UnwirFlG; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743606010; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=x5fMthl+YaILM39iz9o6tccRRw9/3DVe0YNJSzzz678=; b=P73oiCQMdG6YH2d232MQAnOgGWDapn1MiAUU45gmYh77a+gz8lX6OjcU4AiPONRCsYeXQs 3S/zMvbexVAFitQ3sbcakWLLUGxO0Y0tB/G1K22PZNhGdLJquRTt5MsfHzvpT7cGcFrwBk TetBVKHFKFM1GEqJnjBnXnaktvtisv4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743606010; a=rsa-sha256; cv=none; b=XqKE8Y2XocfGJnbTVVlTGWsro5UO1L0vj6AmPPS1+zETHUr9AMZRdtQaLSgd9e9P4eP8TR fxpTrgyBoO8IcRrpLcApSyO8KrFMzLfgvFpTiJKez+PM6JALya1CV33tGmywudubqyiE7/ sOdYK13fe1eG9lVU6N+jXNsAOcli7gM= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=UnwirFlG; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=x5fMthl+YaILM39iz9o6tccRRw9/3DVe0YNJSzzz678=; b=UnwirFlGTRxdERwCdAhFqjsRYZ QoSUv85elJbet28sNBFxLnZYAHDmULxGIgfzgqPFxMCqUmRi/upx0/9/QDXW2BE8oS/QpNNoA1x5h p07RGrO2jfRAI4drMHFoURoaWDb1/B0jPKUN7Sd64RWmVdqDj4rm8hQsoNnTpxEpXm8fyubWc2VrX eiqEIVwY5723zFJd5POxZpsbkfU8xSLaGv0a8Px+rKDZVDIcfCHP2nOwILjdrTWfrAfrAAydB7KOR q5rOnmzK1YhElfHfdv0FsVGgt1vHLqsL1noYlitjyijpBXPKv7CIKBb0wChTCqjI7oejKaw7284Sn yzDMR8Lg==; Received: from willy by casper.infradead.org with local (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzzZX-00000009gse-335e; Wed, 02 Apr 2025 15:00:07 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , intel-gfx@lists.freedesktop.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 7/9] ttm: Call shmem_writeout() from ttm_backup_backup_page() Date: Wed, 2 Apr 2025 16:00:01 +0100 Message-ID: <20250402150005.2309458-8-willy@infradead.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250402150005.2309458-1-willy@infradead.org> References: <20250402150005.2309458-1-willy@infradead.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4C1B11A0016 X-Stat-Signature: 119t1a4bcurd6h5utmddtu9wjjobpf53 X-HE-Tag: 1743606009-96595 X-HE-Meta: U2FsdGVkX1/YnxyNnyKADSXZuR+HaU8r2Fi6VgzCYKBORO7H4QuEviMEBB2i1f1FUdnV49/jgHEWMv4iavDXzo/aaz3HwPqgLq9fIlvMTcpwMc3CdTLAXN0br541d7C9PSnencoQLS5xzl5HPAO7L5tOpgpbMGXPqxyYKSI1AGY4LB3Vh+ZliLGOp0rDJuS7Old7QuOEJgaiMzDT99i620TBMBB1GE+EjdKjrX0HH6vxJFrIRszf0HOIn8SKhztIPs47G8jqIh3vhABofUE7sZBFD39G5EAa9RIdw3+m2rWQJHr6wHpq/k+8TAYMsun3S+ixaTNHE2bNc7jFxOTYw2G8XBYX2gT+Ld9shhINXQ3wUT0ipn7V2+5ArLB78140zlBQnhWdJrWR+kipAoPKQAJQ/vvel83Qp9L3awVSlB89Xp0+WhWLh/CQlkyAPC/+BoLKFAdHOcp09PH3JzKzU/gw3gMUPZHl3EVA4At9svBbG5SD5bUBYbIi5VXvAg47sT4BahHHsXQUEfUZ1jGgynWAlLK2djy9JoAmR4UA6gDFVFIhCkvSV3o6N8XOSAC2F8XTDZsF+d2A+nEv7ddsVEOo3WS05hMsChiwc7Wnh0VlxsbB6aovsTkjmogkY26iQjkwUhQoUXxnvuMtzMxrQzDKnIcEhOKqcMb8KxfIRCoub1i1o+aMjnxfYO4n1vn6FfMe7+6S3jVaWC/+S5lTT8K8eG/udOVMy5G0JiCaykeXlPcMIt2ex1xl5WTE/FY4KYGbqGEpz+52Sl0AvvDbdXNO1jR4vx9sNcnf+y1W1clneC9x1kupKt6MxCQW+ZXXLt3DqEAxYgEpTLIPK5IaimCTG4/KLkUDXU5xvhdovh6ZwLFRe/USc1glxs5CFXaFhwLNBUQl07a9c2hcLi7kOGcdx8+OPvu+BsHUKZXrMKp/BaLYRu2N3vc3LFb8+4PNLOezex22GwELvWnRl7x JwHC0Gvp SgtZ4qN2OdWsFDgMBXyQfn14tz+MVYlaRNEhCf6h6K3zkKqNBerE67UiRKG8A5+E46SzUS+BmeKsGZxcPb41zMCQf8uYdoyLc+mvk8WZSWZcuW9v5runcq4LCYCcHK4jWSCB7KUw3D+KhD8ZilfPk1Fg/H91AWVsNvCf2Ltl++z6TjVcOop1Pd0xF4S6Pr6FSRPllDKmbMcGkQ2BTwczQK/T5IApLN/zbvCnGTezDxx/Q8Hmlf1ANVZ4v8m7xkwKUKDzgWL5X38uPKnhQfdnRb6zrfanMVWlIlrQz 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: The ->writepage operation is being removed. Since this function exclusively deals with shmem folios, we can call shmem_writeout() to write it. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/gpu/drm/ttm/ttm_backup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_backup.c b/drivers/gpu/drm/ttm/ttm_backup.c index 93c007f18855..0d5718466ffc 100644 --- a/drivers/gpu/drm/ttm/ttm_backup.c +++ b/drivers/gpu/drm/ttm/ttm_backup.c @@ -136,13 +136,13 @@ ttm_backup_backup_page(struct ttm_backup *backup, struct page *page, .for_reclaim = 1, }; folio_set_reclaim(to_folio); - ret = mapping->a_ops->writepage(folio_file_page(to_folio, idx), &wbc); + ret = shmem_writeout(to_folio, &wbc); if (!folio_test_writeback(to_folio)) folio_clear_reclaim(to_folio); /* - * If writepage succeeds, it unlocks the folio. - * writepage() errors are otherwise dropped, since writepage() - * is only best effort here. + * If writeout succeeds, it unlocks the folio. errors + * are otherwise dropped, since writeout is only best + * effort here. */ if (ret) folio_unlock(to_folio);