diff options
author | Alex Elder <elder@inktank.com> | 2013-03-11 23:34:22 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:17:23 -0700 |
commit | 28a89ddece39890c255a0c41baf622731a08c288 (patch) | |
tree | 7cfcfc1fd6afbd44e142921799a8857619869d8c /net | |
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')
-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 0a9f6362d4d..95f90b01f75 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, static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip); static int read_partial_message_pages(struct ceph_connection *con, - struct page **pages, unsigned int data_len, bool do_datacrc) { + struct ceph_msg *msg = con->in_msg; struct ceph_msg_pos *msg_pos = &con->in_msg_pos; + struct page **pages; struct page *page; size_t page_offset; size_t length; @@ -2214,6 +2215,7 @@ static int read_partial_message_pages(struct ceph_connection *con, int ret; /* (page) data */ + pages = msg->p.pages; BUG_ON(pages == NULL); page = pages[msg_pos->page]; page_offset = msg_pos->page_pos; @@ -2285,8 +2287,8 @@ static int read_partial_msg_data(struct ceph_connection *con) data_len = le32_to_cpu(con->in_hdr.data_len); while (msg_pos->data_pos < data_len) { if (ceph_msg_has_pages(msg)) { - ret = read_partial_message_pages(con, msg->p.pages, - data_len, do_datacrc); + ret = read_partial_message_pages(con, data_len, + do_datacrc); if (ret <= 0) return ret; #ifdef CONFIG_BLOCK |