linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Richard Weinberger <richard@nod.at>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/4] ubifs: Convert from writepage to writepages
Date: Mon,  5 Jun 2023 17:50:26 +0100	[thread overview]
Message-ID: <20230605165029.2908304-2-willy@infradead.org> (raw)
In-Reply-To: <20230605165029.2908304-1-willy@infradead.org>

This is a simplistic conversion to separate out any effects of
no longer having a writepage method.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/ubifs/file.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 979ab1d9d0c3..8bb4cb9d528f 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1003,8 +1003,10 @@ static int do_writepage(struct page *page, int len)
  * on the page lock and it would not write the truncated inode node to the
  * journal before we have finished.
  */
-static int ubifs_writepage(struct page *page, struct writeback_control *wbc)
+static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc,
+		void *data)
 {
+	struct page *page = &folio->page;
 	struct inode *inode = page->mapping->host;
 	struct ubifs_info *c = inode->i_sb->s_fs_info;
 	struct ubifs_inode *ui = ubifs_inode(inode);
@@ -1076,6 +1078,12 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc)
 	return err;
 }
 
+static int ubifs_writepages(struct address_space *mapping,
+		struct writeback_control *wbc)
+{
+	return write_cache_pages(mapping, wbc, ubifs_writepage, NULL);
+}
+
 /**
  * do_attr_changes - change inode attributes.
  * @inode: inode to change attributes for
@@ -1636,7 +1644,7 @@ static int ubifs_symlink_getattr(struct mnt_idmap *idmap,
 
 const struct address_space_operations ubifs_file_address_operations = {
 	.read_folio     = ubifs_read_folio,
-	.writepage      = ubifs_writepage,
+	.writepages     = ubifs_writepages,
 	.write_begin    = ubifs_write_begin,
 	.write_end      = ubifs_write_end,
 	.invalidate_folio = ubifs_invalidate_folio,
-- 
2.39.2


  reply	other threads:[~2023-06-05 16:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 16:50 [PATCH 0/4] ubifs: Convert writeback to use folios Matthew Wilcox (Oracle)
2023-06-05 16:50 ` Matthew Wilcox (Oracle) [this message]
2023-06-06 14:37   ` [PATCH 1/4] ubifs: Convert from writepage to writepages Zhihao Cheng
2023-06-07 14:11     ` Zhihao Cheng
2023-06-05 16:50 ` [PATCH 2/4] ubifs: Convert ubifs_writepage to use a folio Matthew Wilcox (Oracle)
2023-06-07 14:48   ` Zhihao Cheng
2023-06-05 16:50 ` [PATCH 3/4] ubifs: Use a folio in do_truncation() Matthew Wilcox (Oracle)
2023-06-05 17:05   ` Matthew Wilcox
2023-06-08 14:31     ` Zhihao Cheng
2023-06-05 16:50 ` [PATCH 4/4] ubifs: Convert do_writepage() to take a folio Matthew Wilcox (Oracle)
2023-06-05 19:28   ` kernel test robot
2023-06-05 21:37   ` Richard Weinberger
2023-06-06  3:22     ` Matthew Wilcox
2023-06-06  6:13       ` Richard Weinberger
2023-06-06 12:32         ` Matthew Wilcox
2023-06-06 13:41           ` Richard Weinberger
2023-06-05 23:29   ` kernel test robot
2023-06-08 15:09   ` Zhihao Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605165029.2908304-2-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).