@@ -7513,10 +7513,7 @@ static int slab_debug_trace_open(struct inode *inode, struct file *filep)
7513
7513
return - ENOMEM ;
7514
7514
}
7515
7515
7516
- if (strcmp (filep -> f_path .dentry -> d_name .name , "alloc_traces" ) == 0 )
7517
- alloc = TRACK_ALLOC ;
7518
- else
7519
- alloc = TRACK_FREE ;
7516
+ alloc = debugfs_get_aux_num (filep );
7520
7517
7521
7518
if (!alloc_loc_track (t , PAGE_SIZE / sizeof (struct location ), GFP_KERNEL )) {
7522
7519
bitmap_free (obj_map );
@@ -7572,11 +7569,11 @@ static void debugfs_slab_add(struct kmem_cache *s)
7572
7569
7573
7570
slab_cache_dir = debugfs_create_dir (s -> name , slab_debugfs_root );
7574
7571
7575
- debugfs_create_file ("alloc_traces" , 0400 ,
7576
- slab_cache_dir , s , & slab_debugfs_fops );
7572
+ debugfs_create_file_aux_num ("alloc_traces" , 0400 , slab_cache_dir , s ,
7573
+ TRACK_ALLOC , & slab_debugfs_fops );
7577
7574
7578
- debugfs_create_file ("free_traces" , 0400 ,
7579
- slab_cache_dir , s , & slab_debugfs_fops );
7575
+ debugfs_create_file_aux_num ("free_traces" , 0400 , slab_cache_dir , s ,
7576
+ TRACK_FREE , & slab_debugfs_fops );
7580
7577
}
7581
7578
7582
7579
void debugfs_slab_release (struct kmem_cache * s )
0 commit comments