diff options
author | John Hubbard <jhubbard@nvidia.com> | 2019-08-08 20:56:47 -0700 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-09-16 12:06:25 +0200 |
commit | 96ac9158a230e467d4be737c82702355c6838fc4 (patch) | |
tree | 5b7d450590805db8343ec7a0640bee202260f7f9 /fs/ceph | |
parent | 5435d2069503e2aa89c34a94154f4f2fa4a0c9c4 (diff) | |
download | linux-96ac9158a230e467d4be737c82702355c6838fc4.tar.gz linux-96ac9158a230e467d4be737c82702355c6838fc4.tar.bz2 linux-96ac9158a230e467d4be737c82702355c6838fc4.zip |
ceph: use release_pages() directly
release_pages() has been available to modules since Oct, 2010,
when commit 0be8557bcd34 ("fuse: use release_pages()") added
EXPORT_SYMBOL(release_pages). However, this ceph code was still
using a workaround.
Remove the workaround, and call release_pages() directly.
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 9efd51926792..7ab616601141 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -685,23 +685,6 @@ static int ceph_writepage(struct page *page, struct writeback_control *wbc) } /* - * lame release_pages helper. release_pages() isn't exported to - * modules. - */ -static void ceph_release_pages(struct page **pages, int num) -{ - struct pagevec pvec; - int i; - - pagevec_init(&pvec); - for (i = 0; i < num; i++) { - if (pagevec_add(&pvec, pages[i]) == 0) - pagevec_release(&pvec); - } - pagevec_release(&pvec); -} - -/* * async writeback completion handler. * * If we get an error, set the mapping error bit, but not the individual @@ -776,7 +759,7 @@ static void writepages_finish(struct ceph_osd_request *req) dout("writepages_finish %p wrote %llu bytes cleaned %d pages\n", inode, osd_data->length, rc >= 0 ? num_pages : 0); - ceph_release_pages(osd_data->pages, num_pages); + release_pages(osd_data->pages, num_pages); } ceph_put_wrbuffer_cap_refs(ci, total_pages, snapc); |