From patchwork Sun Nov 13 16:28:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13041576 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 1FA19C4332F for ; Sun, 13 Nov 2022 16:29:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 271C58E0002; Sun, 13 Nov 2022 11:29:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1D5ED8E0001; Sun, 13 Nov 2022 11:29:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 024E68E0002; Sun, 13 Nov 2022 11:29:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E1C058E0001 for ; Sun, 13 Nov 2022 11:29:26 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A432F40837 for ; Sun, 13 Nov 2022 16:29:26 +0000 (UTC) X-FDA: 80128954332.11.D06DAE9 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf28.hostedemail.com (Postfix) with ESMTP id 512B7C000A for ; Sun, 13 Nov 2022 16:29:26 +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=/xbu9xiQdaag/9GdE14AqAfcPfZ9nZ+wREMF3PN8ikU=; b=Zdpc2dMybytlRvYwON8XlABzCT ZMfpsLeusVZ3QKHsCMwKWFO9Kwn7VhCbwu2g9CJFiOBfB/nzdGc+nfgQ9xpO36CHzKpU6jM0cchyh pbaQsfIve7JTynTdwYGSBhgPZO0FafO0tSHF9tAYmPF3i8SqE6hX8HrPpqztnI3RRCUpK9DkD4VUr 1aj4zcLV/It6mFMhS5W+SfkPikRRlQ7xGOLE+wKOfXMk7dFIEhgNFSrOuVtOxWsgD767oZT9xMQXC cABDK5122PBv5+NWwmfZb9tVH4upC9nkFTq3ex30hA8xLr6rkvyv1S+XCEj+yyKm/6mT8eS+5ijTx pdomIdRQ==; 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 1ouFrD-00CJp5-7o; Sun, 13 Nov 2022 16:29:20 +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 3/9] fat: remove ->writepage Date: Sun, 13 Nov 2022 17:28:56 +0100 Message-Id: <20221113162902.883850-4-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=1668356966; a=rsa-sha256; cv=none; b=F947l2HlaKP9yQBsEl4mmj5j92h42zAYtc2Dz6AbsoPhCfc8WKRb4xGVISQZnEqS+Qi1oD tsas+AjvqRV6Ju6W/N0pcfcjOF08PxPsgFzyvf5QvVqRY+dawT8+CuJ3nbdcpTYFk0x0Zi 3r0znVqasXFZutICfFLgfDGmlTTA37I= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Zdpc2dMy; dmarc=none; spf=none (imf28.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=1668356966; 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=/xbu9xiQdaag/9GdE14AqAfcPfZ9nZ+wREMF3PN8ikU=; b=o1MbaVRxZpo3w7//o85nOhJgxfAs/PUNu3DmbIGMlZ521aPEVbjgROQouSGDyLTbGzz/9y JOxWoGnmB+TOi5Jz4NJrHzsrR7m8pOWb6m1fGgc38zm/efFiVIlt44CNlbXjN8XzWQ75Ih N4DyD5sivBEJ1IaR+yRIyouElok8HW8= X-Rspamd-Queue-Id: 512B7C000A X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Zdpc2dMy; dmarc=none; spf=none (imf28.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: rspam06 X-Stat-Signature: k51ooyue7wiadqmhyh7ah6bdstttq1uh X-HE-Tag: 1668356966-236791 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 --- fs/fat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 1cbcc4608dc78..d99b8549ec8f9 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -194,11 +194,6 @@ static int fat_get_block(struct inode *inode, sector_t iblock, return 0; } -static int fat_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, fat_get_block, wbc); -} - static int fat_writepages(struct address_space *mapping, struct writeback_control *wbc) { @@ -346,12 +341,12 @@ static const struct address_space_operations fat_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = fat_read_folio, .readahead = fat_readahead, - .writepage = fat_writepage, .writepages = fat_writepages, .write_begin = fat_write_begin, .write_end = fat_write_end, .direct_IO = fat_direct_IO, - .bmap = _fat_bmap + .bmap = _fat_bmap, + .migrate_folio = buffer_migrate_folio, }; /*