summaryrefslogtreecommitdiffstats
path: root/fs/afs/server.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-11-02 16:08:43 +0000
committerDavid Howells <dhowells@redhat.com>2024-01-01 16:37:27 +0000
commitca0e79a46097d54e4af46c67c852479d97af35bb (patch)
tree4d6df831634dd37fca6dc83e3c85cbeb3d98ddf6 /fs/afs/server.c
parent21c1f410d20295dbeee4178f7fdde5e167e20b43 (diff)
downloadlinux-ca0e79a46097d54e4af46c67c852479d97af35bb.tar.gz
linux-ca0e79a46097d54e4af46c67c852479d97af35bb.tar.bz2
linux-ca0e79a46097d54e4af46c67c852479d97af35bb.zip
afs: Make it possible to find the volumes that are using a server
Make it possible to find the afs_volume structs that are using an afs_server struct to aid in breaking volume callbacks. The way this is done is that each afs_volume already has an array of afs_server_entry records that point to the servers where that volume might be found. An afs_volume backpointer and a list node is added to each entry and each entry is then added to an RCU-traversable list on the afs_server to which it points. 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/server.c')
-rw-r--r--fs/afs/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/server.c b/fs/afs/server.c
index 281625c71aff..db2f66b11b40 100644
--- a/fs/afs/server.c
+++ b/fs/afs/server.c
@@ -217,6 +217,7 @@ static struct afs_server *afs_alloc_server(struct afs_cell *cell,
server->addr_version = alist->version;
server->uuid = *uuid;
rwlock_init(&server->fs_lock);
+ INIT_LIST_HEAD(&server->volumes);
INIT_WORK(&server->initcb_work, afs_server_init_callback_work);
init_waitqueue_head(&server->probe_wq);
INIT_LIST_HEAD(&server->probe_link);