Commit 0be8557bcd34887d5a42c01c5659cab5ecf99f13
Committed by
Linus Torvalds
1 parent
d57af9b214
Exists in
master
and in
39 other branches
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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 2 additions and 6 deletions Side-by-side Diff
fs/fuse/dev.c
... | ... | @@ -1334,12 +1334,7 @@ |
1334 | 1334 | |
1335 | 1335 | static void fuse_retrieve_end(struct fuse_conn *fc, struct fuse_req *req) |
1336 | 1336 | { |
1337 | - int i; | |
1338 | - | |
1339 | - for (i = 0; i < req->num_pages; i++) { | |
1340 | - struct page *page = req->pages[i]; | |
1341 | - page_cache_release(page); | |
1342 | - } | |
1337 | + release_pages(req->pages, req->num_pages, 0); | |
1343 | 1338 | } |
1344 | 1339 | |
1345 | 1340 | static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode, |