afs: Don't assert on unpurgeable server records

Don't give an assertion failure on unpurgeable afs_server records - which
kills the thread - but rather emit a trace line when we are purging a
record (which only happens during network namespace removal or rmmod) and
print a notice of the problem.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells
2020-10-15 09:02:25 +01:00
rodzic dca54a7bbb
commit 7530d3eb3d
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@@ -550,7 +550,12 @@ void afs_manage_servers(struct work_struct *work)
_debug("manage %pU %u", &server->uuid, active);
ASSERTIFCMP(purging, active, ==, 0);
if (purging) {
trace_afs_server(server, atomic_read(&server->ref),
active, afs_server_trace_purging);
if (active != 0)
pr_notice("Can't purge s=%08x\n", server->debug_id);
}
if (active == 0) {
time64_t expire_at = server->unuse_time;