From patchwork Sun Nov 13 16:29:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13041581 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 B0463C4332F for ; Sun, 13 Nov 2022 16:29:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 508CE8000B; Sun, 13 Nov 2022 11:29:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 491418E0001; Sun, 13 Nov 2022 11:29:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35A608000B; Sun, 13 Nov 2022 11:29:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 26EBA8E0001 for ; Sun, 13 Nov 2022 11:29:52 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E0B1C140206 for ; Sun, 13 Nov 2022 16:29:51 +0000 (UTC) X-FDA: 80128955382.14.9242A34 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf10.hostedemail.com (Postfix) with ESMTP id 6E85EC0007 for ; Sun, 13 Nov 2022 16:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=JwXtoXGkop9hD0FEm0hcYM7qnY+377I44KCoQqxQtJQ=; b=wUYRXq26nhv9xpe10rc5HsZITE lyn4MpFMto7QmgQTl2vzV7N0OM3s3fH/vVK2gc5+nQAg7RUdFqAQIHC9tXpykqfwdb/4vzmPQh+lH 2t+TwS1cXGwjpc8wmOruGdig1C1L6zUH3SJ6XYsmuv5SWrNO1SMwly55DS7CPWsvX0ZmHGGzQ+89Z O6uLnzEwgb9YwWHpR4qlN46nYLU9yI9eGZneYZOVFIVUHbMKNmX+cpGz/I3PZP1/4xb+KrGPBkfEY nzGNfI87UnslNJ6EK4QHPF6dLHI30feek9fYrI1OIbxl3VX/SF5ap3Hw14YmVPSAqOAuXL/6kRnxF jvSsVVYg==; Received: from 213-225-8-167.nat.highway.a1.net ([213.225.8.167] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouFrZ-00CK21-8R; Sun, 13 Nov 2022 16:29:42 +0000 From: Christoph Hellwig To: Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org Subject: [PATCH 8/9] omfs: remove ->writepage Date: Sun, 13 Nov 2022 17:29:01 +0100 Message-Id: <20221113162902.883850-9-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221113162902.883850-1-hch@lst.de> References: <20221113162902.883850-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668356991; a=rsa-sha256; cv=none; b=J2dXlWxNJwsLPSXuSUvgXnpmDhInoExUornUHlS37DI7SE/GQIBHKcvsFpFWVNZ/7c+mwk Cp4ZwAdkicf+QIOk47+kwpuYVfS0t57O8tUfTqbusKYloPXtG2mdqQp0bpX3HEHzqrST2v uto8Sl8QSFVkI2QP/i/srsUJawGmCME= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=wUYRXq26; dmarc=none; spf=none (imf10.hostedemail.com: domain of BATV+5e9d9a7f9455f7bb8c66+7021+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+5e9d9a7f9455f7bb8c66+7021+infradead.org+hch@bombadil.srs.infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668356991; 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=JwXtoXGkop9hD0FEm0hcYM7qnY+377I44KCoQqxQtJQ=; b=CAbEgkH1+kXIGRy90h1ofun30Jwg39x2HkACrUrLPTSABXZ2X55eDcZpyUlONrSwkH7tuW WTdBpa9fCUppzobv5RWj/3pDXVsynmevmDtWp+lg4R76sN6CbY6lsBdLfgibXOymvQTNAK Zn4rrvdhyJzUAyIIkCI9MIIzbahtiPk= X-Rspam-User: X-Stat-Signature: g6brdu1fbnrxfffjfid9e3wruq7h7g98 X-Rspamd-Queue-Id: 6E85EC0007 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=wUYRXq26; dmarc=none; spf=none (imf10.hostedemail.com: domain of BATV+5e9d9a7f9455f7bb8c66+7021+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+5e9d9a7f9455f7bb8c66+7021+infradead.org+hch@bombadil.srs.infradead.org X-Rspamd-Server: rspam03 X-HE-Tag: 1668356991-659964 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: ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation. Signed-off-by: Christoph Hellwig Acked-by: Bob Copeland --- fs/omfs/file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/omfs/file.c b/fs/omfs/file.c index fa7fe2393ff68..3a5b4b88a5838 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c @@ -294,11 +294,6 @@ static void omfs_readahead(struct readahead_control *rac) mpage_readahead(rac, omfs_get_block); } -static int omfs_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, omfs_get_block, wbc); -} - static int omfs_writepages(struct address_space *mapping, struct writeback_control *wbc) { @@ -375,10 +370,10 @@ const struct address_space_operations omfs_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = omfs_read_folio, .readahead = omfs_readahead, - .writepage = omfs_writepage, .writepages = omfs_writepages, .write_begin = omfs_write_begin, .write_end = generic_write_end, .bmap = omfs_bmap, + .migrate_folio = buffer_migrate_folio, };