Merge tag 'for-5.19-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[sfrench/cifs-2.6.git] / fs / btrfs / file.c
index af2f2b71d2df756abd6021c56c90339ae30eaa66..9dfde1af8a64a14dcf49627b194893f04ea57aa9 100644 (file)
@@ -1307,11 +1307,12 @@ static int prepare_uptodate_page(struct inode *inode,
                                 struct page *page, u64 pos,
                                 bool force_uptodate)
 {
+       struct folio *folio = page_folio(page);
        int ret = 0;
 
        if (((pos & (PAGE_SIZE - 1)) || force_uptodate) &&
            !PageUptodate(page)) {
-               ret = btrfs_readpage(NULL, page);
+               ret = btrfs_read_folio(NULL, folio);
                if (ret)
                        return ret;
                lock_page(page);
@@ -1321,8 +1322,8 @@ static int prepare_uptodate_page(struct inode *inode,
                }
 
                /*
-                * Since btrfs_readpage() will unlock the page before it
-                * returns, there is a window where btrfs_releasepage() can be
+                * Since btrfs_read_folio() will unlock the folio before it
+                * returns, there is a window where btrfs_release_folio() can be
                 * called to release the page.  Here we check both inode
                 * mapping and PagePrivate() to make sure the page was not
                 * released.
@@ -2401,7 +2402,7 @@ static int btrfs_file_mmap(struct file    *filp, struct vm_area_struct *vma)
 {
        struct address_space *mapping = filp->f_mapping;
 
-       if (!mapping->a_ops->readpage)
+       if (!mapping->a_ops->read_folio)
                return -ENOEXEC;
 
        file_accessed(filp);