linux-stable/fs/afs
David Howells 286377f6bd afs: Fix cell purging with aliases
When the afs module is removed, one of the things that has to be done is to
purge the cell database.  afs_cell_purge() cancels the management timer and
then starts the cell manager work item to do the purging.  This does a
single run through and then assumes that all cells are now purged - but
this is no longer the case.

With the introduction of alias detection, a later cell in the database can
now be holding an active count on an earlier cell (cell->alias_of).  The
purge scan passes by the earlier cell first, but this can't be got rid of
until it has discarded the alias.  Ordinarily, afs_unuse_cell() would
handle this by setting the management timer to trigger another pass - but
afs_set_cell_timer() doesn't do anything if the namespace is being removed
(net->live == false).  rmmod then hangs in the wait on cells_outstanding in
afs_cell_purge().

Fix this by making afs_set_cell_timer() directly queue the cell manager if
net->live is false.  This causes additional management passes.

Queueing the cell manager increments cells_outstanding to make sure the
wait won't complete until all cells are destroyed.

Fixes: 8a070a9648 ("afs: Detect cell aliases 1 - Cells with root volumes")
Signed-off-by: David Howells <dhowells@redhat.com>
2020-10-16 14:38:26 +01:00
..
addr_list.c afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t 2020-03-13 10:47:33 -07:00
afs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
afs_cm.h
afs_fs.h
afs_vl.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
cache.c
callback.c afs: Fix the by-UUID server tree to allow servers with the same UUID 2020-06-04 15:37:57 +01:00
cell.c afs: Fix cell purging with aliases 2020-10-16 14:38:26 +01:00
cmservice.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dir.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
dir_edit.c afs: Remove set but not used variables 'before', 'after' 2019-11-21 20:36:00 +00:00
dir_silly.c afs: Fix silly rename 2020-06-16 22:00:28 +01:00
dynroot.c afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
file.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
flock.c afs: Remove erroneous fallthough annotation 2020-08-27 14:33:01 -05:00
fs_operation.c afs: Fix key ref leak in afs_put_operation() 2020-08-20 10:41:45 -07:00
fs_probe.c rxrpc: Make rxrpc_kernel_get_srtt() indicate validity 2020-08-20 18:21:28 +01:00
fsclient.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
inode.c afs: Fix deadlock between writeback and truncate 2020-10-08 10:50:55 -07:00
internal.h afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
Kconfig docs: filesystems: fix renamed references 2020-04-20 15:45:22 -06:00
main.c afs: Fix rapid cell addition/removal by not using RCU on cells tree 2020-10-16 14:04:59 +01:00
Makefile afs: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
misc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mntpt.c afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
proc.c afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
protocol_uae.h
protocol_yfs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
rotate.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rxrpc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
security.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
server.c afs: Fix hang on rmmod due to outstanding timer 2020-06-20 12:01:58 -07:00
server_list.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
super.c afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
vl_alias.c afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
vl_list.c afs: Don't use VL probe running state to make decisions outside probe code 2020-08-20 18:21:28 +01:00
vl_probe.c afs: Don't use VL probe running state to make decisions outside probe code 2020-08-20 18:21:28 +01:00
vl_rotate.c afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
vlclient.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
volume.c afs: Fix cell refcounting by splitting the usage counter 2020-10-16 14:38:22 +01:00
write.c afs: Fix deadlock between writeback and truncate 2020-10-08 10:50:55 -07:00
xattr.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
xdr_fs.h
yfsclient.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00