diff options
author | Alex Elder <elder@inktank.com> | 2013-03-12 00:34:22 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 00:17:23 -0400 |
commit | 28a89ddece39890c255a0c41baf622731a08c288 (patch) | |
tree | 7cfcfc1fd6afbd44e142921799a8857619869d8c /net/ceph/messenger.c | |
parent | 888334f966fab232fe9158c2c2f0a935e356b583 (diff) |
libceph: drop pages parameter
The value passed for "pages" in read_partial_message_pages() is
always the pages pointer from the incoming message, which can be
derived inside that function. So just get rid of the parameter.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r-- | net/ceph/messenger.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 0a9f6362d4d8..95f90b01f753 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -2203,10 +2203,11 @@ static int read_partial_message_section(struct ceph_connection *con, | |||
2203 | static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip); | 2203 | static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip); |
2204 | 2204 | ||
2205 | static int read_partial_message_pages(struct ceph_connection *con, | 2205 | static int read_partial_message_pages(struct ceph_connection *con, |
2206 | struct page **pages, | ||
2207 | unsigned int data_len, bool do_datacrc) | 2206 | unsigned int data_len, bool do_datacrc) |
2208 | { | 2207 | { |
2208 | struct ceph_msg *msg = con->in_msg; | ||
2209 | struct ceph_msg_pos *msg_pos = &con->in_msg_pos; | 2209 | struct ceph_msg_pos *msg_pos = &con->in_msg_pos; |
2210 | struct page **pages; | ||
2210 | struct page *page; | 2211 | struct page *page; |
2211 | size_t page_offset; | 2212 | size_t page_offset; |
2212 | size_t length; | 2213 | size_t length; |
@@ -2214,6 +2215,7 @@ static int read_partial_message_pages(struct ceph_connection *con, | |||
2214 | int ret; | 2215 | int ret; |
2215 | 2216 | ||
2216 | /* (page) data */ | 2217 | /* (page) data */ |
2218 | pages = msg->p.pages; | ||
2217 | BUG_ON(pages == NULL); | 2219 | BUG_ON(pages == NULL); |
2218 | page = pages[msg_pos->page]; | 2220 | page = pages[msg_pos->page]; |
2219 | page_offset = msg_pos->page_pos; | 2221 | page_offset = msg_pos->page_pos; |
@@ -2285,8 +2287,8 @@ static int read_partial_msg_data(struct ceph_connection *con) | |||
2285 | data_len = le32_to_cpu(con->in_hdr.data_len); | 2287 | data_len = le32_to_cpu(con->in_hdr.data_len); |
2286 | while (msg_pos->data_pos < data_len) { | 2288 | while (msg_pos->data_pos < data_len) { |
2287 | if (ceph_msg_has_pages(msg)) { | 2289 | if (ceph_msg_has_pages(msg)) { |
2288 | ret = read_partial_message_pages(con, msg->p.pages, | 2290 | ret = read_partial_message_pages(con, data_len, |
2289 | data_len, do_datacrc); | 2291 | do_datacrc); |
2290 | if (ret <= 0) | 2292 | if (ret <= 0) |
2291 | return ret; | 2293 | return ret; |
2292 | #ifdef CONFIG_BLOCK | 2294 | #ifdef CONFIG_BLOCK |