ext4: remove references to bh->b_page
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 13 Feb 2025 18:23:01 +0000 (18:23 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 18 Mar 2025 04:15:25 +0000 (00:15 -0400)
Buffer heads are attached to folios, not to pages.  Also
flush_dcache_page() is now deprecated in favour of flush_dcache_folio().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250213182303.2133205-1-willy@infradead.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c
fs/ext4/super.c
fs/jbd2/journal.c

index f5c6937c2ebc42e4f756c78bfa2af35d1095d71b..aede80fa17814318ee7b4c9439f39adc560e25cb 100644 (file)
@@ -752,7 +752,7 @@ static void ext4_update_bh_state(struct buffer_head *bh, unsigned long flags)
        flags &= EXT4_MAP_FLAGS;
 
        /* Dummy buffer_head? Set non-atomically. */
-       if (!bh->b_page) {
+       if (!bh->b_folio) {
                bh->b_state = (bh->b_state & ~EXT4_MAP_FLAGS) | flags;
                return;
        }
index cdc435af1088e448c4c14832be2249bc8f47ee5d..fec729bc287ed4720e3f9fe0dae8d6f30dc9ee53 100644 (file)
@@ -7306,7 +7306,7 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
        }
        lock_buffer(bh);
        memcpy(bh->b_data+offset, data, len);
-       flush_dcache_page(bh->b_page);
+       flush_dcache_folio(bh->b_folio);
        unlock_buffer(bh);
        err = ext4_handle_dirty_metadata(handle, NULL, bh);
        brelse(bh);
index 51f7a8cc43a7a656130e823a7ee0a649f08822b7..ff41a31e2bc9f03d9448a4e9542b4d0f2bb8a808 100644 (file)
@@ -947,7 +947,7 @@ int jbd2_journal_bmap(journal_t *journal, unsigned long blocknr,
  * descriptor blocks we do need to generate bona fide buffers.
  *
  * After the caller of jbd2_journal_get_descriptor_buffer() has finished modifying
- * the buffer's contents they really should run flush_dcache_page(bh->b_page).
+ * the buffer's contents they really should run flush_dcache_folio(bh->b_folio).
  * But we don't bother doing that, so there will be coherency problems with
  * mmaps of blockdevs which hold live JBD-controlled filesystems.
  */