Merge tag 'mm-stable-2024-05-17-19-19' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / fs / crypto / inline_crypt.c
index b4002aea7cdb9d9b0adf873f74b901d7cb05a34c..40de69860dcf976f56d31fe5053eca766932a599 100644 (file)
@@ -284,7 +284,7 @@ static bool bh_get_inode_and_lblk_num(const struct buffer_head *bh,
                                      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;
 
@@ -292,13 +292,13 @@ static bool bh_get_inode_and_lblk_num(const struct buffer_head *bh,
         * 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;
 }