From patchwork Sun Nov 13 16:28:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13041575 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 8C450C433FE for ; Sun, 13 Nov 2022 16:29:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 90B4C6B0073; Sun, 13 Nov 2022 11:29:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 79E7D8E0002; Sun, 13 Nov 2022 11:29:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A17E8E0003; Sun, 13 Nov 2022 11:29:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 435F78E0002 for ; Sun, 13 Nov 2022 11:29:25 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 118791A0907 for ; Sun, 13 Nov 2022 16:29:25 +0000 (UTC) X-FDA: 80128954290.03.6379FF1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf02.hostedemail.com (Postfix) with ESMTP id E0E628000A for ; Sun, 13 Nov 2022 16:29:22 +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=5b0HJs6BQQ2q0Kk5NRtkmifAYyqmzj66xADh1qM10M0=; b=KGgZVJw+zfxpaLBuhQjRpHNEYn 10b8xdf3xvPFTiPuWr1zXm+4e+1+9Milh54Dzt4O/GuaWAVilFEiAvWu+wkdn3bFwnb4Q11uSLIrd 0EuYf5pAvNmhIJN9X3+rcL9wzs8lBEAclVOfiFxKEmOp4hsxiMNcGoji1TeYzgaBo4kpirTcC02AZ Szw8ic2CR+yHIghaQGROTusREc56h/Ozn5JBc4l85U2JToj1xU53uwDNLe2NyNH+wLdZwzic2GQlA 5+pWB5gWan9ujAYVO57mZe/hVhpQrC+TwgbQhYX9n4citW6+c86b3rCQ459lmbZslOI02aUu19r6G /2FcORkA==; 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 1ouFr4-00CJnJ-EB; Sun, 13 Nov 2022 16:29:11 +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 1/9] extfat: remove ->writepage Date: Sun, 13 Nov 2022 17:28:54 +0100 Message-Id: <20221113162902.883850-2-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=1668356963; a=rsa-sha256; cv=none; b=wGl7i8zz7vEYbeH4OYRrb2Wv+eaGWOxzeoNQCjNmdEsED/G71nHru6vq2kHEN1RWZ8eUNP KxkMdNBqvOsxtiGF9U6N/f7n5PMj3jqfCjmvHVlbFL98OoLyz6K7yOws6WZKhBhZna2yHD QtgQdsr4qO9faP2YdGUlAsYZqQpiyfE= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=KGgZVJw+; dmarc=none; spf=none (imf02.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=1668356963; 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=5b0HJs6BQQ2q0Kk5NRtkmifAYyqmzj66xADh1qM10M0=; b=LLi3wAZ3cP55Dngp9PkR4oYFxpyZ6LNvU2WIZy6rqz7E9lptmEzqD6ijPvJlzIL55/GCTU U/ELJVhQJ2ddtZ8zE0/H0Xp+LW7bkdY5BEpXIS779fTAjlBnv92hUbl1wIh4vWQjw+bLMi wqblX5hwp666v8PbVM+awaW48LMvGoU= X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=KGgZVJw+; dmarc=none; spf=none (imf02.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: rspam02 X-Stat-Signature: mog9eeeu11kf4fcf3xzs4c6478nqrekr X-Rspamd-Queue-Id: E0E628000A X-HE-Tag: 1668356962-17394 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: Namjae Jeon --- fs/exfat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index 5590a1e83126c..eac95bcd9a8aa 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -345,11 +345,6 @@ static void exfat_readahead(struct readahead_control *rac) mpage_readahead(rac, exfat_get_block); } -static int exfat_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, exfat_get_block, wbc); -} - static int exfat_writepages(struct address_space *mapping, struct writeback_control *wbc) { @@ -473,12 +468,12 @@ static const struct address_space_operations exfat_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = exfat_read_folio, .readahead = exfat_readahead, - .writepage = exfat_writepage, .writepages = exfat_writepages, .write_begin = exfat_write_begin, .write_end = exfat_write_end, .direct_IO = exfat_direct_IO, - .bmap = exfat_aop_bmap + .bmap = exfat_aop_bmap, + .migrate_folio = buffer_migrate_folio, }; static inline unsigned long exfat_hash(loff_t i_pos)