Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4566155rwb; Sun, 13 Nov 2022 08:30:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf5zWuBESarAHwLdHZRtK3a949pphYbxDeeiLSW/UpqSV51wIJBlXBahuESegYvtJUU3ebGJ X-Received: by 2002:a05:6402:3814:b0:461:7d1f:1a7b with SMTP id es20-20020a056402381400b004617d1f1a7bmr8174131edb.400.1668357045747; Sun, 13 Nov 2022 08:30:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668357045; cv=none; d=google.com; s=arc-20160816; b=PIDGqotv/820b495MY8J3D01rAj1EzZ3Z7qjUc2u7f4pZkccNKSKADh43d1rBs7XO4 RwU1N4fzRe4srXwO72ijN5g+ozUXxo6JDkr47LTU/nb402P2PhXy3EQmLqg9kIYm5QrZ 1IKBFZ0KHITTO23bpuhAMRdIGS6HTA6KOZMfK6D2/RrqmE55pW/HvgfldKaSg4kf9R67 ATEiYV8glzf/d2RYXjrCVQFSVf0DvAPRHZ9+yX77dLZKww3uTX9wf8x8AERzogMjPAXm 0K633C8bz7czIH4ncjao4jd3C/fziJJOydOsmccHpVNwKqN+xvbYV6JcfVahQ4HVZJiO WcbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/xbu9xiQdaag/9GdE14AqAfcPfZ9nZ+wREMF3PN8ikU=; b=TG7lOEvbpLtS5Viw6DQCK00jbeS7JZgwORFmDPcjAkUG9X8KIZb+joZd2rzHpV7g/u LtzJO0eDWbHPjw1Wr617pKgcYNQPbdAnmcvv4iq7f0IW1zsZEM7HyCrqTAjxEEK1ieX5 +olASDo4jNrUX2cL7r11AOp4VGouKYGEzRymqdmohnew6YwJ8F9ZCd+TDek+fyjCcx6C /eExv+UWmUb6V3BeX+0EaZEnGLehWXHcGr6QucWFAaKtvvkZpG8/oj/2BU13SNtKWPML 3rYy/hwQS6ing7w+RUCaxkUemwt7JLKJWQhXye3QNCPbLUhLZz993LnB7fMjz91VTSbO wRDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Zdpc2dMy; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p27-20020a17090635db00b00780488c11bbsi5100887ejb.388.2022.11.13.08.30.22; Sun, 13 Nov 2022 08:30:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Zdpc2dMy; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235369AbiKMQ3g (ORCPT + 99 others); Sun, 13 Nov 2022 11:29:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbiKMQ3Z (ORCPT ); Sun, 13 Nov 2022 11:29:25 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA4B49FE9; Sun, 13 Nov 2022 08:29:24 -0800 (PST) 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 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org ->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, }; /* -- 2.30.2