aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-02-06 14:11:38 -0500
committerAlex Elder <elder@inktank.com>2013-02-19 20:14:04 -0500
commitb324814e8436772cb3367b14149ba003a9954525 (patch)
tree37ab98802744072a3e348623f1c880ae11546203
parent9e0eb85d5861d512759caf1301670b36d4c221ed (diff)
libceph: use void pointers in page vector functions
The functions used for working with ceph page vectors are defined with char pointers, but they're really intended to operate on untyped data. Change the types of these function parameters to (void *) to reflect this. (Note that the functions now assume void pointer arithmetic works like arithmetic on char pointers.) Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r--include/linux/ceph/libceph.h10
-rw-r--r--net/ceph/pagevec.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index c44275ab375c..2250f8bb2490 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -222,7 +222,7 @@ extern int ceph_open_session(struct ceph_client *client);
222/* pagevec.c */ 222/* pagevec.c */
223extern void ceph_release_page_vector(struct page **pages, int num_pages); 223extern void ceph_release_page_vector(struct page **pages, int num_pages);
224 224
225extern struct page **ceph_get_direct_page_vector(const char __user *data, 225extern struct page **ceph_get_direct_page_vector(const void __user *data,
226 int num_pages, 226 int num_pages,
227 bool write_page); 227 bool write_page);
228extern void ceph_put_page_vector(struct page **pages, int num_pages, 228extern void ceph_put_page_vector(struct page **pages, int num_pages,
@@ -230,15 +230,15 @@ extern void ceph_put_page_vector(struct page **pages, int num_pages,
230extern void ceph_release_page_vector(struct page **pages, int num_pages); 230extern void ceph_release_page_vector(struct page **pages, int num_pages);
231extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); 231extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags);
232extern int ceph_copy_user_to_page_vector(struct page **pages, 232extern int ceph_copy_user_to_page_vector(struct page **pages,
233 const char __user *data, 233 const void __user *data,
234 loff_t off, size_t len); 234 loff_t off, size_t len);
235extern int ceph_copy_to_page_vector(struct page **pages, 235extern int ceph_copy_to_page_vector(struct page **pages,
236 const char *data, 236 const void *data,
237 loff_t off, size_t len); 237 loff_t off, size_t len);
238extern int ceph_copy_from_page_vector(struct page **pages, 238extern int ceph_copy_from_page_vector(struct page **pages,
239 char *data, 239 void *data,
240 loff_t off, size_t len); 240 loff_t off, size_t len);
241extern int ceph_copy_page_vector_to_user(struct page **pages, char __user *data, 241extern int ceph_copy_page_vector_to_user(struct page **pages, void __user *data,
242 loff_t off, size_t len); 242 loff_t off, size_t len);
243extern void ceph_zero_page_vector_range(int off, int len, struct page **pages); 243extern void ceph_zero_page_vector_range(int off, int len, struct page **pages);
244 244
diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c
index cd9c21df87d1..5b20be979c19 100644
--- a/net/ceph/pagevec.c
+++ b/net/ceph/pagevec.c
@@ -12,7 +12,7 @@
12/* 12/*
13 * build a vector of user pages 13 * build a vector of user pages
14 */ 14 */
15struct page **ceph_get_direct_page_vector(const char __user *data, 15struct page **ceph_get_direct_page_vector(const void __user *data,
16 int num_pages, bool write_page) 16 int num_pages, bool write_page)
17{ 17{
18 struct page **pages; 18 struct page **pages;
@@ -93,7 +93,7 @@ EXPORT_SYMBOL(ceph_alloc_page_vector);
93 * copy user data into a page vector 93 * copy user data into a page vector
94 */ 94 */
95int ceph_copy_user_to_page_vector(struct page **pages, 95int ceph_copy_user_to_page_vector(struct page **pages,
96 const char __user *data, 96 const void __user *data,
97 loff_t off, size_t len) 97 loff_t off, size_t len)
98{ 98{
99 int i = 0; 99 int i = 0;
@@ -119,7 +119,7 @@ int ceph_copy_user_to_page_vector(struct page **pages,
119EXPORT_SYMBOL(ceph_copy_user_to_page_vector); 119EXPORT_SYMBOL(ceph_copy_user_to_page_vector);
120 120
121int ceph_copy_to_page_vector(struct page **pages, 121int ceph_copy_to_page_vector(struct page **pages,
122 const char *data, 122 const void *data,
123 loff_t off, size_t len) 123 loff_t off, size_t len)
124{ 124{
125 int i = 0; 125 int i = 0;
@@ -143,7 +143,7 @@ int ceph_copy_to_page_vector(struct page **pages,
143EXPORT_SYMBOL(ceph_copy_to_page_vector); 143EXPORT_SYMBOL(ceph_copy_to_page_vector);
144 144
145int ceph_copy_from_page_vector(struct page **pages, 145int ceph_copy_from_page_vector(struct page **pages,
146 char *data, 146 void *data,
147 loff_t off, size_t len) 147 loff_t off, size_t len)
148{ 148{
149 int i = 0; 149 int i = 0;
@@ -170,7 +170,7 @@ EXPORT_SYMBOL(ceph_copy_from_page_vector);
170 * copy user data from a page vector into a user pointer 170 * copy user data from a page vector into a user pointer
171 */ 171 */
172int ceph_copy_page_vector_to_user(struct page **pages, 172int ceph_copy_page_vector_to_user(struct page **pages,
173 char __user *data, 173 void __user *data,
174 loff_t off, size_t len) 174 loff_t off, size_t len)
175{ 175{
176 int i = 0; 176 int i = 0;