Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96ac9158 authored by John Hubbard's avatar John Hubbard Committed by Ilya Dryomov
Browse files

ceph: use release_pages() directly



release_pages() has been available to modules since Oct, 2010,
when commit 0be8557b ("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: default avatarJohn Hubbard <jhubbard@nvidia.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 5435d206
Loading
Loading
Loading
Loading
+1 −18
Original line number Diff line number Diff line
@@ -684,23 +684,6 @@ static int ceph_writepage(struct page *page, struct writeback_control *wbc)
	return err;
}

/*
 * 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.
 *
@@ -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);