提交 0be8557b 编写于 作者: M Miklos Szeredi 提交者: Linus Torvalds

fuse: use release_pages()

Replace iterated page_cache_release() with release_pages(), which is
faster and shorter.

Needs release_pages() to be exported to modules.
Suggested-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d57af9b2
......@@ -1334,12 +1334,7 @@ static int fuse_notify_store(struct fuse_conn *fc, unsigned int size,
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,
......
......@@ -378,6 +378,7 @@ void release_pages(struct page **pages, int nr, int cold)
pagevec_free(&pages_to_free);
}
EXPORT_SYMBOL(release_pages);
/*
* The pages which we're about to release may be in the deferred lru-addition
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册