diff options
author | 2024-09-30 09:45:17 -0400 | |
---|---|---|
committer | 2024-10-25 17:05:50 +0200 | |
commit | 71e10dc2f561b1f7cef5152a865813339e96d575 (patch) | |
tree | 4048eeb67fcf416cf62ef2f581ad3cb47c5c5734 | |
parent | fuse: use the folio based vmstat helpers (diff) | |
download | wireguard-linux-71e10dc2f561b1f7cef5152a865813339e96d575.tar.xz wireguard-linux-71e10dc2f561b1f7cef5152a865813339e96d575.zip |
fuse: convert fuse_retrieve to use folios
We're just looking for pages in a mapping, use a folio and the folio
lookup function directly instead of using the page helper.
Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/fuse/dev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 1f64ae6d7a69..a332cb799967 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1756,15 +1756,15 @@ static int fuse_retrieve(struct fuse_mount *fm, struct inode *inode, index = outarg->offset >> PAGE_SHIFT; while (num && ap->num_pages < num_pages) { - struct page *page; + struct folio *folio; unsigned int this_num; - page = find_get_page(mapping, index); - if (!page) + folio = filemap_get_folio(mapping, index); + if (IS_ERR(folio)) break; this_num = min_t(unsigned, num, PAGE_SIZE - offset); - ap->pages[ap->num_pages] = page; + ap->pages[ap->num_pages] = &folio->page; ap->descs[ap->num_pages].offset = offset; ap->descs[ap->num_pages].length = this_num; ap->num_pages++; |