From patchwork Sun Nov 13 16:28:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13041577 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 F2786C433FE for ; Sun, 13 Nov 2022 16:29:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8D9AC80007; Sun, 13 Nov 2022 11:29:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 88B578E0001; Sun, 13 Nov 2022 11:29:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7781D80007; Sun, 13 Nov 2022 11:29:31 -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 687778E0001 for ; Sun, 13 Nov 2022 11:29:31 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2AE5980978 for ; Sun, 13 Nov 2022 16:29:31 +0000 (UTC) X-FDA: 80128954542.09.696BAF7 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf22.hostedemail.com (Postfix) with ESMTP id DE430C0006 for ; Sun, 13 Nov 2022 16:29:30 +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=5EEi8cInv3ks31I/nmTl0wJaf2VmtmozgKaSoblZ/nw=; b=1SbIPs1iFU+7TJOgzkiJf2RvBs 2XzmwVKtUH+kZqH7A36H1Wbg+vKnJpDNlb6xKtvuTlKG0eGjPoQQYRvlscMAAocgvR6VMPofTIG2D C+y5XrFdah5UyaOY7msF15XC44ocxoaKSrFQ6FttO4KIK9nTS4cuGeLqvpIl9ulpzUdcM4c+JMwjM V8FaL9blLKhDvLC8WvpLfuXFxjXC9wudXB9FmyTMvzWE6wkwNl+IkzupEJSkEGn6t5dX2vBO8ZlRk HQdfmuqFBmta5GLulUNuImMueBME4ZGS+MBcQ/xhhfaXZ0G/j/xK5VJycJsTzRVisDdUNap2eB7Ql vz3UMr+A==; 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 1ouFrH-00CJqO-HX; Sun, 13 Nov 2022 16:29:24 +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 4/9] hfs: remove ->writepage Date: Sun, 13 Nov 2022 17:28:57 +0100 Message-Id: <20221113162902.883850-5-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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668356970; 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=5EEi8cInv3ks31I/nmTl0wJaf2VmtmozgKaSoblZ/nw=; b=E1dzWcPtBHixcIwEPIr67MuQO/DoIWkIb3q3FHfKaY0WNdZK5bXnA3Qu9p7oYItkqUfmUM ACWvhZrn3mgCqzlhpMy6rI53SYk4k3xia9qiE6YTi4mlXoRgxsujsNTfxQaYwJWlXxNL9F HhSpaxfdHqE4c0KV6UBchkYyjs7szuE= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=1SbIPs1i; dmarc=none; spf=none (imf22.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668356970; a=rsa-sha256; cv=none; b=EX7YIA5cquZFhC87UINpHRsMZzQ9XxIWwnpKE5aV9oDHCW7iuZ2IX7WrKXqbFm3Tg5Pj2v L8eQl2abR95/flJy0h+EaMHiMdzJMmwLq5Znyj1VAfEwAZmGkDRR921h9y3f6kyA+scJa8 KNG6oHtMZVq6DAwJf0MJKtFLf0lSbWk= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: DE430C0006 X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=1SbIPs1i; dmarc=none; spf=none (imf22.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-Stat-Signature: 4z9yhkmhhbtf4hb485dy7zpy8xsi3uam X-HE-Tag: 1668356970-271343 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 stop wiring up ->writepage for hfs_aops. Signed-off-by: Christoph Hellwig --- fs/hfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index c4526f16355d5..16466a5e88b44 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -173,12 +173,12 @@ const struct address_space_operations hfs_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = hfs_read_folio, - .writepage = hfs_writepage, .write_begin = hfs_write_begin, .write_end = generic_write_end, .bmap = hfs_bmap, .direct_IO = hfs_direct_IO, .writepages = hfs_writepages, + .migrate_folio = buffer_migrate_folio, }; /*