Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ref_tracker: add a top level debugfs directory for ref_tracker

Add a new "ref_tracker" directory in debugfs. Each individual refcount
tracker can register files under there to display info about
currently-held references.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20250618-reftrack-dbgfs-v15-2-24fc37ead144@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jeff Layton and committed by
Jakub Kicinski
e209f919 7d02ba96

+13
+13
lib/ref_tracker.c
··· 273 273 return 0; 274 274 } 275 275 EXPORT_SYMBOL_GPL(ref_tracker_free); 276 + 277 + #ifdef CONFIG_DEBUG_FS 278 + #include <linux/debugfs.h> 279 + 280 + static struct dentry *ref_tracker_debug_dir = (struct dentry *)-ENOENT; 281 + 282 + static int __init ref_tracker_debugfs_init(void) 283 + { 284 + ref_tracker_debug_dir = debugfs_create_dir("ref_tracker", NULL); 285 + return 0; 286 + } 287 + late_initcall(ref_tracker_debugfs_init); 288 + #endif /* CONFIG_DEBUG_FS */