From 32222f09782f1894fcfc37f6505ca676a6f4d1d6 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 7 Nov 2023 17:59:33 +0000 Subject: afs: Apply server breaks to mmap'd files in the call processor Apply server breaks to mmap'd files that are being used from that server from the call processor work function rather than punting it off to a workqueue. The work item, afs_server_init_callback(), then bumps each individual inode off to its own work item introducing a potentially lengthy delay. This reduces that delay at the cost of extending the amount of time we delay replying to the CB.InitCallBack3 notification RPC from the server. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org --- fs/afs/cell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/afs/cell.c') diff --git a/fs/afs/cell.c b/fs/afs/cell.c index 55ee194e31ff..e4b6a80763d7 100644 --- a/fs/afs/cell.c +++ b/fs/afs/cell.c @@ -161,7 +161,7 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net, refcount_set(&cell->ref, 1); atomic_set(&cell->active, 0); INIT_WORK(&cell->manager, afs_manage_cell_work); - spin_lock_init(&cell->vs_lock); + init_rwsem(&cell->vs_lock); cell->volumes = RB_ROOT; INIT_HLIST_HEAD(&cell->proc_volumes); seqlock_init(&cell->volume_lock); -- cgit v1.2.3