aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-05-11 18:21:35 -0400
committerDavid Howells <dhowells@redhat.com>2018-05-14 10:15:18 -0400
commit001ab5a67ee5d191c64aebf4b4ef8c7a0dcfd2bc (patch)
treedffcddcb639f543b2430bac3566d5a9a170d7f7b
parent3d9fa91161387ee629e7a07c47934d119910c8ae (diff)
afs: Fix the handling of CB.InitCallBackState3 to find the server by UUID
Fix the handling of the CB.InitCallBackState3 service call to find the record of a server that we're using by looking it up by the UUID passed as the parameter rather than by its address (of which it might have many, and which may change). Fixes: c35eccb1f614 ("[AFS]: Implement the CB.InitCallBackState3 operation.") Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--fs/afs/cmservice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
index 357de908df3a..bcd13397bd59 100644
--- a/fs/afs/cmservice.c
+++ b/fs/afs/cmservice.c
@@ -341,7 +341,6 @@ static int afs_deliver_cb_init_call_back_state(struct afs_call *call)
341 */ 341 */
342static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) 342static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
343{ 343{
344 struct sockaddr_rxrpc srx;
345 struct afs_server *server; 344 struct afs_server *server;
346 struct afs_uuid *r; 345 struct afs_uuid *r;
347 unsigned loop; 346 unsigned loop;
@@ -398,8 +397,9 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
398 397
399 /* we'll need the file server record as that tells us which set of 398 /* we'll need the file server record as that tells us which set of
400 * vnodes to operate upon */ 399 * vnodes to operate upon */
401 rxrpc_kernel_get_peer(call->net->socket, call->rxcall, &srx); 400 rcu_read_lock();
402 server = afs_find_server(call->net, &srx); 401 server = afs_find_server_by_uuid(call->net, call->request);
402 rcu_read_unlock();
403 if (!server) 403 if (!server)
404 return -ENOTCONN; 404 return -ENOTCONN;
405 call->cm_server = server; 405 call->cm_server = server;