summaryrefslogtreecommitdiff
path: root/fs/afs/vl_alias.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-10-13 22:51:59 +0300
committerDavid Howells <dhowells@redhat.com>2020-10-16 16:39:21 +0300
commitdca54a7bbb8ca9148ae10d60c66c926e222a9c4b (patch)
tree7a963929b4c3ef79910ef1c56ea1ea45248fcfb7 /fs/afs/vl_alias.c
parent1d0e850a49a5b56f8f3cb51e74a11e2fedb96be6 (diff)
downloadlinux-dca54a7bbb8ca9148ae10d60c66c926e222a9c4b.tar.xz
afs: Add tracing for cell refcount and active user count
Add a tracepoint to log the cell refcount and active user count and pass in a reason code through various functions that manipulate these counters. Additionally, a helper function, afs_see_cell(), is provided to log interesting places that deal with a cell without actually doing any accounting directly. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/vl_alias.c')
-rw-r--r--fs/afs/vl_alias.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/afs/vl_alias.c b/fs/afs/vl_alias.c
index ddb4cb67d0fd..f04a80e4f5c3 100644
--- a/fs/afs/vl_alias.c
+++ b/fs/afs/vl_alias.c
@@ -177,7 +177,7 @@ static int afs_compare_cell_roots(struct afs_cell *cell)
is_alias:
rcu_read_unlock();
- cell->alias_of = afs_use_cell(p);
+ cell->alias_of = afs_use_cell(p, afs_cell_trace_use_alias);
return 1;
}
@@ -247,18 +247,18 @@ static int afs_query_for_alias(struct afs_cell *cell, struct key *key)
continue;
if (p->root_volume)
continue; /* Ignore cells that have a root.cell volume. */
- afs_use_cell(p);
+ afs_use_cell(p, afs_cell_trace_use_check_alias);
mutex_unlock(&cell->net->proc_cells_lock);
if (afs_query_for_alias_one(cell, key, p) != 0)
goto is_alias;
if (mutex_lock_interruptible(&cell->net->proc_cells_lock) < 0) {
- afs_unuse_cell(cell->net, p);
+ afs_unuse_cell(cell->net, p, afs_cell_trace_unuse_check_alias);
return -ERESTARTSYS;
}
- afs_unuse_cell(cell->net, p);
+ afs_unuse_cell(cell->net, p, afs_cell_trace_unuse_check_alias);
}
mutex_unlock(&cell->net->proc_cells_lock);