reiserfs: replace obvious uses of b_page with b_folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 15 Dec 2022 21:44:01 +0000 (21:44 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 19 Jan 2023 01:12:41 +0000 (17:12 -0800)
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.

Link: https://lkml.kernel.org/r/20221215214402.3522366-12-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/reiserfs/journal.c
fs/reiserfs/tail_conversion.c

index 9f62da7..9ce4ec2 100644 (file)
@@ -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 @@ loop_next:
                 * 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);
index b0ae088..2cec61a 100644 (file)
@@ -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);