From e38f299ececc6b63a47074cc922ce8bbd3350c58 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 26 Oct 2023 18:13:13 +0100 Subject: afs: Use peer + service_id as call address Use the rxrpc_peer plus the service ID as the call address instead of passing in a sockaddr_srx down to rxrpc. The peer record is obtained by using rxrpc_kernel_get_peer(). This avoids the need to repeatedly look up the peer and allows rxrpc to hold on to resources for it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org --- fs/afs/vl_list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/afs/vl_list.c') diff --git a/fs/afs/vl_list.c b/fs/afs/vl_list.c index 3a2875933261..5c4cd71caccf 100644 --- a/fs/afs/vl_list.c +++ b/fs/afs/vl_list.c @@ -23,6 +23,7 @@ struct afs_vlserver *afs_alloc_vlserver(const char *name, size_t name_len, spin_lock_init(&vlserver->probe_lock); vlserver->rtt = UINT_MAX; vlserver->name_len = name_len; + vlserver->service_id = VL_SERVICE; vlserver->port = port; memcpy(vlserver->name, name, name_len); } @@ -92,7 +93,7 @@ static struct afs_addr_list *afs_extract_vl_addrs(struct afs_net *net, const u8 *b = *_b; int ret = -EINVAL; - alist = afs_alloc_addrlist(nr_addrs, VL_SERVICE); + alist = afs_alloc_addrlist(nr_addrs); if (!alist) return ERR_PTR(-ENOMEM); if (nr_addrs == 0) -- cgit v1.2.3-70-g09d2