fuse: use release_pages()
Subsystems (2)
Miklos Szeredi
maintainerPATCH 1/1 fuse: use release_pages()
In reply to a message not in the archiveFrom: Miklos Szeredi <[email protected]>
Replace iterated page_cache_release() with release_pages(), which is faster and shorter.
Needs release_pages() to be exported to modules.
Suggested-by Andrew Morton <[email protected]>
Signed-off-by Miklos Szeredi <[email protected]>
--- fs/fuse/dev.c | 7 +------ mm/swap.c | 1 + 2 files changed, 2 insertions(+), 6 deletions(-)
fs/fuse/dev.c +1 -6
@@ -1336,12 +1336,7 @@ out_finish:static void fuse_retrieve_end (struct fuse_conn *fc,struct fuse_req *req) { -int i; - -for (i =0 ; i < req->num_pages; i++) { -struct page *page = req->pages[i]; -page_cache_release (page); - } +release_pages (req->pages, req->num_pages,0 ); } static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
mm/swap.c +1 -0
@@ -378,6 +378,7 @@ void release_pages(struct page **pages,pagevec_free (&pages_to_free); } +EXPORT_SYMBOL (release_pages);/* * The pages which we're about to release may be in the deferred lru-addition