summaryrefslogtreecommitdiff
path: root/fs/afs/addr_list.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-10-26 20:13:13 +0300
committerDavid Howells <dhowells@redhat.com>2023-12-24 18:22:55 +0300
commite38f299ececc6b63a47074cc922ce8bbd3350c58 (patch)
treeecc17b03534f8cf14931c7aefe68e439e88afca6 /fs/afs/addr_list.c
parent905b86156423de48480d915c5cd3c23bef1bc043 (diff)
downloadlinux-e38f299ececc6b63a47074cc922ce8bbd3350c58.tar.xz
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 <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org
Diffstat (limited to 'fs/afs/addr_list.c')
-rw-r--r--fs/afs/addr_list.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/afs/addr_list.c b/fs/afs/addr_list.c
index 41ef0c879239..032e6963c5d8 100644
--- a/fs/afs/addr_list.c
+++ b/fs/afs/addr_list.c
@@ -56,13 +56,12 @@ struct afs_addr_list *afs_get_addrlist(struct afs_addr_list *alist, enum afs_ali
/*
* Allocate an address list.
*/
-struct afs_addr_list *afs_alloc_addrlist(unsigned int nr, u16 service_id)
+struct afs_addr_list *afs_alloc_addrlist(unsigned int nr)
{
struct afs_addr_list *alist;
- unsigned int i;
static atomic_t debug_id;
- _enter("%u,%u", nr, service_id);
+ _enter("%u", nr);
if (nr > AFS_MAX_ADDRESSES)
nr = AFS_MAX_ADDRESSES;
@@ -74,9 +73,6 @@ struct afs_addr_list *afs_alloc_addrlist(unsigned int nr, u16 service_id)
refcount_set(&alist->usage, 1);
alist->max_addrs = nr;
alist->debug_id = atomic_inc_return(&debug_id);
-
- for (i = 0; i < nr; i++)
- alist->addrs[i].service_id = service_id;
trace_afs_alist(alist->debug_id, 1, afs_alist_trace_alloc);
return alist;
}
@@ -150,7 +146,7 @@ struct afs_vlserver_list *afs_parse_text_addrs(struct afs_net *net,
if (!vllist->servers[0].server)
goto error_vl;
- alist = afs_alloc_addrlist(nr, service);
+ alist = afs_alloc_addrlist(nr);
if (!alist)
goto error;