summaryrefslogtreecommitdiff
path: root/fs/afs/vl_list.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-10-26 18:13:13 +0100
committerDavid Howells <dhowells@redhat.com>2023-12-24 15:22:55 +0000
commite38f299ececc6b63a47074cc922ce8bbd3350c58 (patch)
treeecc17b03534f8cf14931c7aefe68e439e88afca6 /fs/afs/vl_list.c
parent905b86156423de48480d915c5cd3c23bef1bc043 (diff)
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/vl_list.c')
-rw-r--r--fs/afs/vl_list.c3
1 files changed, 2 insertions, 1 deletions
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)