summaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-01-24 17:52:57 +0000
committerRichard Weinberger <richard@nod.at>2024-02-25 21:08:02 +0100
commitd06192731c335cb7b62ad0dd211de26e03d56f3f (patch)
tree90511223f55d3411827031d3e506819ea924f65d /fs/ubifs
parent7f348f8ce51c963d99a66d00ab73717f35dd27e1 (diff)
downloadlinux-d06192731c335cb7b62ad0dd211de26e03d56f3f.tar.gz
linux-d06192731c335cb7b62ad0dd211de26e03d56f3f.tar.bz2
linux-d06192731c335cb7b62ad0dd211de26e03d56f3f.zip
ubifs: Use a folio in ubifs_do_bulk_read()
When looking in the page cache, retrieve a folio instead of a page. This would need some work to make it safe for large folios. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index f481fca7f53d..11bf9f8cca6c 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -775,19 +775,19 @@ static int ubifs_do_bulk_read(struct ubifs_info *c, struct bu_info *bu,
for (page_idx = 1; page_idx < page_cnt; page_idx++) {
pgoff_t page_offset = offset + page_idx;
- struct page *page;
+ struct folio *folio;
if (page_offset > end_index)
break;
- page = pagecache_get_page(mapping, page_offset,
+ folio = __filemap_get_folio(mapping, page_offset,
FGP_LOCK|FGP_ACCESSED|FGP_CREAT|FGP_NOWAIT,
ra_gfp_mask);
- if (!page)
+ if (IS_ERR(folio))
break;
- if (!PageUptodate(page))
- err = populate_page(c, page, bu, &n);
- unlock_page(page);
- put_page(page);
+ if (!folio_test_uptodate(folio))
+ err = populate_page(c, &folio->page, bu, &n);
+ folio_unlock(folio);
+ folio_put(folio);
if (err)
break;
}