Commit 97e3043a authored by David Howells's avatar David Howells

afs: Condense afs_call's reply{,2,3,4} into an array

Condense struct afs_call's reply anchor members - reply{,2,3,4} - into an
array.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent f780c8ea
...@@ -281,7 +281,7 @@ static int afs_readpage(struct file *file, struct page *page) ...@@ -281,7 +281,7 @@ static int afs_readpage(struct file *file, struct page *page)
static void afs_readpages_page_done(struct afs_call *call, struct afs_read *req) static void afs_readpages_page_done(struct afs_call *call, struct afs_read *req)
{ {
#ifdef CONFIG_AFS_FSCACHE #ifdef CONFIG_AFS_FSCACHE
struct afs_vnode *vnode = call->reply; struct afs_vnode *vnode = call->reply[0];
#endif #endif
struct page *page = req->pages[req->index]; struct page *page = req->pages[req->index];
......
This diff is collapsed.
...@@ -81,10 +81,7 @@ struct afs_call { ...@@ -81,10 +81,7 @@ struct afs_call {
struct address_space *mapping; /* page set */ struct address_space *mapping; /* page set */
struct afs_writeback *wb; /* writeback being performed */ struct afs_writeback *wb; /* writeback being performed */
void *buffer; /* reply receive buffer */ void *buffer; /* reply receive buffer */
void *reply; /* reply buffer (first part) */ void *reply[4]; /* Where to put the reply */
void *reply2; /* reply buffer (second part) */
void *reply3; /* reply buffer (third part) */
void *reply4; /* reply buffer (fourth part) */
pgoff_t first; /* first page in mapping to deal with */ pgoff_t first; /* first page in mapping to deal with */
pgoff_t last; /* last page in mapping to deal with */ pgoff_t last; /* last page in mapping to deal with */
size_t offset; /* offset into received data store */ size_t offset; /* offset into received data store */
......
...@@ -639,7 +639,7 @@ static void afs_process_async_call(struct work_struct *work) ...@@ -639,7 +639,7 @@ static void afs_process_async_call(struct work_struct *work)
} }
if (call->state == AFS_CALL_COMPLETE) { if (call->state == AFS_CALL_COMPLETE) {
call->reply = NULL; call->reply[0] = NULL;
/* We have two refs to release - one from the alloc and one /* We have two refs to release - one from the alloc and one
* queued with the work item - and we can't just deallocate the * queued with the work item - and we can't just deallocate the
......
...@@ -32,7 +32,7 @@ static int afs_deliver_vl_get_entry_by_xxx(struct afs_call *call) ...@@ -32,7 +32,7 @@ static int afs_deliver_vl_get_entry_by_xxx(struct afs_call *call)
return ret; return ret;
/* unmarshall the reply once we've received all of it */ /* unmarshall the reply once we've received all of it */
entry = call->reply; entry = call->reply[0];
bp = call->buffer; bp = call->buffer;
for (loop = 0; loop < 64; loop++) for (loop = 0; loop < 64; loop++)
...@@ -135,7 +135,7 @@ int afs_vl_get_entry_by_name(struct afs_net *net, ...@@ -135,7 +135,7 @@ int afs_vl_get_entry_by_name(struct afs_net *net,
return -ENOMEM; return -ENOMEM;
call->key = key; call->key = key;
call->reply = entry; call->reply[0] = entry;
/* marshall the parameters */ /* marshall the parameters */
bp = call->request; bp = call->request;
...@@ -170,7 +170,7 @@ int afs_vl_get_entry_by_id(struct afs_net *net, ...@@ -170,7 +170,7 @@ int afs_vl_get_entry_by_id(struct afs_net *net,
return -ENOMEM; return -ENOMEM;
call->key = key; call->key = key;
call->reply = entry; call->reply[0] = entry;
/* marshall the parameters */ /* marshall the parameters */
bp = call->request; bp = call->request;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment