aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcutree_trace.c')
-rw-r--r--kernel/rcutree_trace.c45
1 files changed, 15 insertions, 30 deletions
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
index ea4a47470371..31af3a0fb6d5 100644
--- a/kernel/rcutree_trace.c
+++ b/kernel/rcutree_trace.c
@@ -265,62 +265,47 @@ static struct file_operations rcu_pending_fops = {
265}; 265};
266 266
267static struct dentry *rcudir; 267static struct dentry *rcudir;
268static struct dentry *datadir;
269static struct dentry *datadir_csv;
270static struct dentry *gpdir;
271static struct dentry *hierdir;
272static struct dentry *rcu_pendingdir;
273 268
274static int __init rcuclassic_trace_init(void) 269static int __init rcuclassic_trace_init(void)
275{ 270{
271 struct dentry *retval;
272
276 rcudir = debugfs_create_dir("rcu", NULL); 273 rcudir = debugfs_create_dir("rcu", NULL);
277 if (!rcudir) 274 if (!rcudir)
278 goto out; 275 goto free_out;
279 276
280 datadir = debugfs_create_file("rcudata", 0444, rcudir, 277 retval = debugfs_create_file("rcudata", 0444, rcudir,
281 NULL, &rcudata_fops); 278 NULL, &rcudata_fops);
282 if (!datadir) 279 if (!retval)
283 goto free_out; 280 goto free_out;
284 281
285 datadir_csv = debugfs_create_file("rcudata.csv", 0444, rcudir, 282 retval = debugfs_create_file("rcudata.csv", 0444, rcudir,
286 NULL, &rcudata_csv_fops); 283 NULL, &rcudata_csv_fops);
287 if (!datadir_csv) 284 if (!retval)
288 goto free_out; 285 goto free_out;
289 286
290 gpdir = debugfs_create_file("rcugp", 0444, rcudir, NULL, &rcugp_fops); 287 retval = debugfs_create_file("rcugp", 0444, rcudir, NULL, &rcugp_fops);
291 if (!gpdir) 288 if (!retval)
292 goto free_out; 289 goto free_out;
293 290
294 hierdir = debugfs_create_file("rcuhier", 0444, rcudir, 291 retval = debugfs_create_file("rcuhier", 0444, rcudir,
295 NULL, &rcuhier_fops); 292 NULL, &rcuhier_fops);
296 if (!hierdir) 293 if (!retval)
297 goto free_out; 294 goto free_out;
298 295
299 rcu_pendingdir = debugfs_create_file("rcu_pending", 0444, rcudir, 296 retval = debugfs_create_file("rcu_pending", 0444, rcudir,
300 NULL, &rcu_pending_fops); 297 NULL, &rcu_pending_fops);
301 if (!rcu_pendingdir) 298 if (!retval)
302 goto free_out; 299 goto free_out;
303 return 0; 300 return 0;
304free_out: 301free_out:
305 if (datadir) 302 debugfs_remove_recursive(rcudir);
306 debugfs_remove(datadir);
307 if (datadir_csv)
308 debugfs_remove(datadir_csv);
309 if (gpdir)
310 debugfs_remove(gpdir);
311 debugfs_remove(rcudir);
312out:
313 return 1; 303 return 1;
314} 304}
315 305
316static void __exit rcuclassic_trace_cleanup(void) 306static void __exit rcuclassic_trace_cleanup(void)
317{ 307{
318 debugfs_remove(datadir); 308 debugfs_remove_recursive(rcudir);
319 debugfs_remove(datadir_csv);
320 debugfs_remove(gpdir);
321 debugfs_remove(hierdir);
322 debugfs_remove(rcu_pendingdir);
323 debugfs_remove(rcudir);
324} 309}
325 310
326 311