提交 d0676a16 编写于 作者: D David Howells

afs: Rename struct afs_call server member to cm_server

Rename the server member of struct afs_call to cm_server as we're only
going to be using it for incoming calls for the Cache Manager service.
This makes it easier to differentiate from the pointer to the target server
for the client, which will point to a different structure to allow for
callback handling.
Signed-off-by: NDavid Howells <dhowells@redhat.com>
上级 03dc2cfc
...@@ -144,12 +144,10 @@ static void afs_cm_destructor(struct afs_call *call) ...@@ -144,12 +144,10 @@ static void afs_cm_destructor(struct afs_call *call)
* afs_deliver_cb_callback(). * afs_deliver_cb_callback().
*/ */
if (call->unmarshall == 5) { if (call->unmarshall == 5) {
ASSERT(call->server && call->count && call->request); ASSERT(call->cm_server && call->count && call->request);
afs_break_callbacks(call->server, call->count, call->request); afs_break_callbacks(call->cm_server, call->count, call->request);
} }
afs_put_server(call->net, call->server);
call->server = NULL;
kfree(call->buffer); kfree(call->buffer);
call->buffer = NULL; call->buffer = NULL;
} }
...@@ -170,7 +168,7 @@ static void SRXAFSCB_CallBack(struct work_struct *work) ...@@ -170,7 +168,7 @@ static void SRXAFSCB_CallBack(struct work_struct *work)
* yet */ * yet */
afs_send_empty_reply(call); afs_send_empty_reply(call);
afs_break_callbacks(call->server, call->count, call->request); afs_break_callbacks(call->cm_server, call->count, call->request);
afs_put_call(call); afs_put_call(call);
_leave(""); _leave("");
} }
...@@ -290,7 +288,7 @@ static int afs_deliver_cb_callback(struct afs_call *call) ...@@ -290,7 +288,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
server = afs_find_server(call->net, &srx); server = afs_find_server(call->net, &srx);
if (!server) if (!server)
return -ENOTCONN; return -ENOTCONN;
call->server = server; call->cm_server = server;
return afs_queue_call_work(call); return afs_queue_call_work(call);
} }
...@@ -302,9 +300,9 @@ static void SRXAFSCB_InitCallBackState(struct work_struct *work) ...@@ -302,9 +300,9 @@ static void SRXAFSCB_InitCallBackState(struct work_struct *work)
{ {
struct afs_call *call = container_of(work, struct afs_call, work); struct afs_call *call = container_of(work, struct afs_call, work);
_enter("{%p}", call->server); _enter("{%p}", call->cm_server);
afs_init_callback_state(call->server); afs_init_callback_state(call->cm_server);
afs_send_empty_reply(call); afs_send_empty_reply(call);
afs_put_call(call); afs_put_call(call);
_leave(""); _leave("");
...@@ -335,7 +333,7 @@ static int afs_deliver_cb_init_call_back_state(struct afs_call *call) ...@@ -335,7 +333,7 @@ static int afs_deliver_cb_init_call_back_state(struct afs_call *call)
server = afs_find_server(call->net, &srx); server = afs_find_server(call->net, &srx);
if (!server) if (!server)
return -ENOTCONN; return -ENOTCONN;
call->server = server; call->cm_server = server;
return afs_queue_call_work(call); return afs_queue_call_work(call);
} }
...@@ -407,7 +405,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) ...@@ -407,7 +405,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
server = afs_find_server(call->net, &srx); server = afs_find_server(call->net, &srx);
if (!server) if (!server)
return -ENOTCONN; return -ENOTCONN;
call->server = server; call->cm_server = server;
return afs_queue_call_work(call); return afs_queue_call_work(call);
} }
......
...@@ -76,7 +76,7 @@ struct afs_call { ...@@ -76,7 +76,7 @@ struct afs_call {
struct rxrpc_call *rxcall; /* RxRPC call handle */ struct rxrpc_call *rxcall; /* RxRPC call handle */
struct key *key; /* security for this call */ struct key *key; /* security for this call */
struct afs_net *net; /* The network namespace */ struct afs_net *net; /* The network namespace */
struct afs_server *server; /* server affected by incoming CM call */ struct afs_server *cm_server; /* Server affected by incoming CM call */
void *request; /* request data (first part) */ void *request; /* request data (first part) */
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 */
......
...@@ -161,6 +161,7 @@ void afs_put_call(struct afs_call *call) ...@@ -161,6 +161,7 @@ void afs_put_call(struct afs_call *call)
if (call->type->destructor) if (call->type->destructor)
call->type->destructor(call); call->type->destructor(call);
afs_put_server(call->net, call->cm_server);
kfree(call->request); kfree(call->request);
kfree(call); kfree(call);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册