aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle)2022-04-29 11:12:16 -0400
committerMatthew Wilcox (Oracle)2022-05-09 16:21:45 -0400
commitfb12489b0dfd0028dc504575f3fae0532c412cf4 (patch)
tree3f94af76c22726d67dea54f88c8210ee4a75b78e /fs/btrfs/file.c
parenta13fe6928ae269b70fb15bd0fafe9ce1151a9332 (diff)
btrfs: Convert btrfs to read_folio
This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 59510d7b1c65..373df5ebaf8d 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -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,7 +1322,7 @@ static int prepare_uptodate_page(struct inode *inode,
}
/*
- * Since btrfs_readpage() will unlock the page before it
+ * Since btrfs_read_folio() will unlock the folio before it
* returns, there is a window where btrfs_releasepage() can be
* called to release the page. Here we check both inode
* mapping and PagePrivate() to make sure the page was not