Commit 413e8f01 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Miklos Szeredi

fuse: Convert fuse_readpages_end() to use folio_end_read()

Nobody checks the error flag on fuse folios, so stop setting it.
Optimise the (optional) setting of the uptodate flag and clearing
of the lock flag by using folio_end_read().
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 96d88f65
......@@ -935,14 +935,10 @@ static void fuse_readpages_end(struct fuse_mount *fm, struct fuse_args *args,
}
for (i = 0; i < ap->num_pages; i++) {
struct page *page = ap->pages[i];
struct folio *folio = page_folio(ap->pages[i]);
if (!err)
SetPageUptodate(page);
else
SetPageError(page);
unlock_page(page);
put_page(page);
folio_end_read(folio, !err);
folio_put(folio);
}
if (ia->ff)
fuse_file_put(ia->ff, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment