From patchwork Fri Dec 2 10:26:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062593 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 B23FCC4332F for ; Fri, 2 Dec 2022 10:27:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4D1356B0081; Fri, 2 Dec 2022 05:27:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 481246B0082; Fri, 2 Dec 2022 05:27:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 370F16B0083; Fri, 2 Dec 2022 05:27:17 -0500 (EST) 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 27DA86B0081 for ; Fri, 2 Dec 2022 05:27:17 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E89CD140A57 for ; Fri, 2 Dec 2022 10:27:16 +0000 (UTC) X-FDA: 80196988872.21.804DBE2 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf03.hostedemail.com (Postfix) with ESMTP id 9C69020014 for ; Fri, 2 Dec 2022 10:27:15 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=HXq5AdxV; spf=none (imf03.hostedemail.com: domain of BATV+dbb76fff442e09cb8719+7040+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+dbb76fff442e09cb8719+7040+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669976835; 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=ywtjhPQcgOlGzjWc3Exa4ySbtdQqSrPXJutgQizLuUo=; b=XbzJ8BZ0FLrKsO/+9LaUMu8kYt+vW7YzKtLGqfztM1e088A+0Oe6qW2h/CQp58VQ0TGeh4 lS7ApJpNInAt7v24/QzY+EvW+ulBydoJAQTtzsAqHR4rwTWpM1uM4SV3czYDKJokJdxLpI vHzB3lpMq7Zz6pOtB4DZAgRkU8Zw4Qk= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=HXq5AdxV; spf=none (imf03.hostedemail.com: domain of BATV+dbb76fff442e09cb8719+7040+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+dbb76fff442e09cb8719+7040+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669976835; a=rsa-sha256; cv=none; b=BLPuOjGL8yxnqZOrR4/RrMMf8VI9S25JpjTbS7drqknOvYz2qhYwvd1bMSmV63RXYiZOP/ /h/ttCHeMPbVhezUa27X+BXm9RqKO7U/qwSbNrhYRpok633mAFmyUo8BnNUH88ydTLOk3s YUAlwVizZjdKfLXxNYyXHpcOhUp3Uw4= 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=ywtjhPQcgOlGzjWc3Exa4ySbtdQqSrPXJutgQizLuUo=; b=HXq5AdxV/JLPsHwBXHtl6u2lb/ O7u7n/5ATf1Y7czUryBELG+fWD6o77IRDBXirmaK99zd0OnuWoCsFD0vvB7MBwGPmX+UfXJ6JYnHe 60yXoyn70JPY2g2sOi+iZ6861z+gHmCSZj06a3POXM4lZjepl0cQW4c1s99+y0pdCmW36KUOMkD4l xEH4Q9edKiH5Kyi92aSET/9e7N2etBpDpDi60GkmsRcId338irWzzNt/ZjxGhj83RHXOQC9rfYLSX 2hZ27PRsmWgyB65AhiG12LwsukHkkFy+mJ6XLTA/KuMEgryP5l2NB3YI2C6BRf2mEyCfDxmY5jCLd MLpoafjg==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13G7-00FR4c-4r; Fri, 02 Dec 2022 10:27:07 +0000 From: Christoph Hellwig To: Andrew Morton , 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, Johannes Weiner Subject: [PATCH 7/7] omfs: remove ->writepage Date: Fri, 2 Dec 2022 11:26:44 +0100 Message-Id: <20221202102644.770505-8-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-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 X-Spamd-Result: default: False [0.84 / 9.00]; BAYES_HAM(-2.76)[98.95%]; R_MISSING_CHARSET(2.50)[]; MID_CONTAINS_FROM(1.00)[]; FORGED_SENDER(0.30)[hch@lst.de,BATV@bombadil.srs.infradead.org]; R_DKIM_ALLOW(-0.20)[infradead.org:s=bombadil.20210309]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_NA(0.00)[no SPF record]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWELVE(0.00)[14]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TAGGED_FROM(0.00)[dbb76fff442e09cb8719,7040,infradead.org,hch]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[infradead.org:+]; TO_DN_SOME(0.00)[]; ARC_SIGNED(0.00)[hostedemail.com:s=arc-20220608:i=1]; DMARC_NA(0.00)[lst.de]; FROM_NEQ_ENVFROM(0.00)[hch@lst.de,BATV@bombadil.srs.infradead.org] X-Rspamd-Queue-Id: 9C69020014 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: 81k9x79spyk4cf43omxjaybb6qcjwyh7 X-HE-Tag: 1669976835-529497 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 Acked-by: Johannes Weiner --- 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 fa7fe2393ff686..3a5b4b88a58385 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, };