All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH 11/12] reiserfs: Replace obvious uses of b_page with b_folio
Date: Thu, 15 Dec 2022 21:44:01 +0000	[thread overview]
Message-ID: <20221215214402.3522366-12-willy@infradead.org> (raw)
In-Reply-To: <20221215214402.3522366-1-willy@infradead.org>

These places just use b_page to get to the buffer's address_space
or call page_folio() on b_page to get a folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/reiserfs/journal.c         | 4 ++--
 fs/reiserfs/tail_conversion.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 9f62da7471c9..9ce4ec296b74 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -601,7 +601,7 @@ static int journal_list_still_alive(struct super_block *s,
  */
 static void release_buffer_page(struct buffer_head *bh)
 {
-	struct folio *folio = page_folio(bh->b_page);
+	struct folio *folio = bh->b_folio;
 	if (!folio->mapping && folio_trylock(folio)) {
 		folio_get(folio);
 		put_bh(bh);
@@ -866,7 +866,7 @@ static int write_ordered_buffers(spinlock_t * lock,
 		 * will ever write the buffer. We're safe if we write the
 		 * page one last time after freeing the journal header.
 		 */
-		if (buffer_dirty(bh) && unlikely(bh->b_page->mapping == NULL)) {
+		if (buffer_dirty(bh) && unlikely(bh->b_folio->mapping == NULL)) {
 			spin_unlock(lock);
 			write_dirty_buffer(bh, 0);
 			spin_lock(lock);
diff --git a/fs/reiserfs/tail_conversion.c b/fs/reiserfs/tail_conversion.c
index b0ae088dffc7..2cec61af2a9e 100644
--- a/fs/reiserfs/tail_conversion.c
+++ b/fs/reiserfs/tail_conversion.c
@@ -177,7 +177,7 @@ void reiserfs_unmap_buffer(struct buffer_head *bh)
 	 * BUG() on attempt to write not mapped buffer
 	 */
 	if ((!list_empty(&bh->b_assoc_buffers) || bh->b_private) && bh->b_page) {
-		struct inode *inode = bh->b_page->mapping->host;
+		struct inode *inode = bh->b_folio->mapping->host;
 		struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb);
 		spin_lock(&j->j_dirty_buffers_lock);
 		list_del_init(&bh->b_assoc_buffers);
-- 
2.35.1


  parent reply	other threads:[~2022-12-15 21:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 21:43 [PATCH 00/12] Start converting buffer_heads to use folios Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 01/12] buffer: Add b_folio as an alias of b_page Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 02/12] buffer: Replace obvious uses of b_page with b_folio Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 03/12] buffer: Use b_folio in touch_buffer() Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 04/12] buffer: Use b_folio in end_buffer_async_read() Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 05/12] buffer: Use b_folio in end_buffer_async_write() Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 06/12] page_io: Remove buffer_head include Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 07/12] buffer: Use b_folio in mark_buffer_dirty() Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 08/12] gfs2: Replace obvious uses of b_page with b_folio Matthew Wilcox (Oracle)
2022-12-15 21:43 ` [PATCH 09/12] jbd2: " Matthew Wilcox (Oracle)
2022-12-15 21:44 ` [PATCH 10/12] nilfs2: " Matthew Wilcox (Oracle)
2022-12-15 21:44 ` Matthew Wilcox (Oracle) [this message]
2022-12-15 21:44 ` [PATCH 12/12] mpage: Use b_folio in do_mpage_readpage() Matthew Wilcox (Oracle)
2023-01-12 12:01 ` [PATCH 00/12] Start converting buffer_heads to use folios Jan Kara

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=20221215214402.3522366-12-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.