const struct inode **inode_ret,
                                      u64 *lblk_num_ret)
 {
-       struct page *page = bh->b_page;
+       struct folio *folio = bh->b_folio;
        const struct address_space *mapping;
        const struct inode *inode;
 
         * The ext4 journal (jbd2) can submit a buffer_head it directly created
         * for a non-pagecache page.  fscrypt doesn't care about these.
         */
-       mapping = page_mapping(page);
+       mapping = folio_mapping(folio);
        if (!mapping)
                return false;
        inode = mapping->host;
 
        *inode_ret = inode;
-       *lblk_num_ret = ((u64)page->index << (PAGE_SHIFT - inode->i_blkbits)) +
+       *lblk_num_ret = ((u64)folio->index << (PAGE_SHIFT - inode->i_blkbits)) +
                        (bh_offset(bh) >> inode->i_blkbits);
        return true;
 }