aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ref_tracker.c
diff options
context:
space:
mode:
authorJeff Layton <[email protected]>2025-06-18 14:24:22 +0000
committerJakub Kicinski <[email protected]>2025-06-20 00:02:04 +0000
commit707bd05be75f65749c3f1695f4e362a89b3fcc7b (patch)
tree17eef3415153efe93237fdf0941a9597274b7b14 /lib/ref_tracker.c
parentnet: add symlinks to ref_tracker_dir for netns (diff)
downloadkernel-707bd05be75f65749c3f1695f4e362a89b3fcc7b.tar.gz
kernel-707bd05be75f65749c3f1695f4e362a89b3fcc7b.zip
ref_tracker: eliminate the ref_tracker_dir name field
Now that we have dentries and the ability to create meaningful symlinks to them, don't keep a name string in each tracker. Switch the output format to print "class@address", and drop the name field. Also, add a kerneldoc header for ref_tracker_dir_init(). Signed-off-by: Jeff Layton <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/ref_tracker.c')
-rw-r--r--lib/ref_tracker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c
index 6608520d6118..dcf923a1edf5 100644
--- a/lib/ref_tracker.c
+++ b/lib/ref_tracker.c
@@ -155,7 +155,7 @@ __ref_tracker_dir_pr_ostream(struct ref_tracker_dir *dir,
stats = ref_tracker_get_stats(dir, display_limit);
if (IS_ERR(stats)) {
pr_ostream(s, "%s%s@%p: couldn't get stats, error %pe\n",
- s->prefix, dir->name, dir, stats);
+ s->prefix, dir->class, dir, stats);
return;
}
@@ -166,14 +166,14 @@ __ref_tracker_dir_pr_ostream(struct ref_tracker_dir *dir,
if (sbuf && !stack_depot_snprint(stack, sbuf, STACK_BUF_SIZE, 4))
sbuf[0] = 0;
pr_ostream(s, "%s%s@%p has %d/%d users at\n%s\n", s->prefix,
- dir->name, dir, stats->stacks[i].count,
+ dir->class, dir, stats->stacks[i].count,
stats->total, sbuf);
skipped -= stats->stacks[i].count;
}
if (skipped)
pr_ostream(s, "%s%s@%p skipped reports about %d/%d users.\n",
- s->prefix, dir->name, dir, skipped, stats->total);
+ s->prefix, dir->class, dir, skipped, stats->total);
kfree(sbuf);