summaryrefslogtreecommitdiff
path: root/fs/ufs/dir.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-08 12:11:21 -0400
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:31:51 +0200
commitbf9883d5779117776c2e25d29d4dfed31d390fb2 (patch)
treea1a33a1971b8e13f97f329267b4a6f496e4c1da9 /fs/ufs/dir.c
parent8400291e289ee6b2bf9779ff1c83a291501f017b (diff)
ufs: Convert ufs_get_page() to use a folio
Remove a call to read_mapping_page(). Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ufs/dir.c')
-rw-r--r--fs/ufs/dir.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/ufs/dir.c b/fs/ufs/dir.c
index 61f25d3cf3f7..0705848899c1 100644
--- a/fs/ufs/dir.c
+++ b/fs/ufs/dir.c
@@ -194,18 +194,19 @@ fail:
static struct page *ufs_get_page(struct inode *dir, unsigned long n)
{
struct address_space *mapping = dir->i_mapping;
- struct page *page = read_mapping_page(mapping, n, NULL);
- if (!IS_ERR(page)) {
- kmap(page);
- if (unlikely(!PageChecked(page))) {
- if (!ufs_check_page(page))
- goto fail;
- }
+ struct folio *folio = read_mapping_folio(mapping, n, NULL);
+
+ if (IS_ERR(folio))
+ return &folio->page;
+ kmap(&folio->page);
+ if (unlikely(!folio_test_checked(folio))) {
+ if (!ufs_check_page(&folio->page))
+ goto fail;
}
- return page;
+ return &folio->page;
fail:
- ufs_put_page(page);
+ ufs_put_page(&folio->page);
return ERR_PTR(-EIO);
}