Commit ef7bca1456e7f65e66b9466c3b149601fe32eec0
1 parent
a9e599e558
Exists in
master
and in
20 other branches
oprofile: don't bother with passing superblock to ->create_files()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 10 changed files with 91 additions and 93 deletions Side-by-side Diff
- arch/alpha/oprofile/common.c
- arch/avr32/oprofile/op_model_avr32.c
- arch/mips/oprofile/common.c
- arch/powerpc/oprofile/common.c
- arch/s390/oprofile/init.c
- arch/x86/oprofile/nmi_int.c
- arch/x86/oprofile/op_model_amd.c
- drivers/oprofile/oprofile_files.c
- drivers/oprofile/oprofile_perf.c
- include/linux/oprofile.h
arch/alpha/oprofile/common.c
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | } |
107 | 107 | |
108 | 108 | static int |
109 | -op_axp_create_files(struct super_block *sb, struct dentry *root) | |
109 | +op_axp_create_files(struct dentry *root) | |
110 | 110 | { |
111 | 111 | int i; |
112 | 112 | |
113 | 113 | |
114 | 114 | |
115 | 115 | |
116 | 116 | |
117 | 117 | |
... | ... | @@ -115,23 +115,23 @@ |
115 | 115 | char buf[4]; |
116 | 116 | |
117 | 117 | snprintf(buf, sizeof buf, "%d", i); |
118 | - dir = oprofilefs_mkdir(sb, root, buf); | |
118 | + dir = oprofilefs_mkdir(root->d_sb, root, buf); | |
119 | 119 | |
120 | - oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); | |
121 | - oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); | |
122 | - oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); | |
120 | + oprofilefs_create_ulong(root->d_sb, dir, "enabled", &ctr[i].enabled); | |
121 | + oprofilefs_create_ulong(root->d_sb, dir, "event", &ctr[i].event); | |
122 | + oprofilefs_create_ulong(root->d_sb, dir, "count", &ctr[i].count); | |
123 | 123 | /* Dummies. */ |
124 | - oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); | |
125 | - oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); | |
126 | - oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); | |
124 | + oprofilefs_create_ulong(root->d_sb, dir, "kernel", &ctr[i].kernel); | |
125 | + oprofilefs_create_ulong(root->d_sb, dir, "user", &ctr[i].user); | |
126 | + oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &ctr[i].unit_mask); | |
127 | 127 | } |
128 | 128 | |
129 | 129 | if (model->can_set_proc_mode) { |
130 | - oprofilefs_create_ulong(sb, root, "enable_pal", | |
130 | + oprofilefs_create_ulong(root->d_sb, root, "enable_pal", | |
131 | 131 | &sys.enable_pal); |
132 | - oprofilefs_create_ulong(sb, root, "enable_kernel", | |
132 | + oprofilefs_create_ulong(root->d_sb, root, "enable_kernel", | |
133 | 133 | &sys.enable_kernel); |
134 | - oprofilefs_create_ulong(sb, root, "enable_user", | |
134 | + oprofilefs_create_ulong(root->d_sb, root, "enable_user", | |
135 | 135 | &sys.enable_user); |
136 | 136 | } |
137 | 137 |
arch/avr32/oprofile/op_model_avr32.c
... | ... | @@ -97,8 +97,7 @@ |
97 | 97 | return IRQ_HANDLED; |
98 | 98 | } |
99 | 99 | |
100 | -static int avr32_perf_counter_create_files(struct super_block *sb, | |
101 | - struct dentry *root) | |
100 | +static int avr32_perf_counter_create_files(struct dentry *root) | |
102 | 101 | { |
103 | 102 | struct dentry *dir; |
104 | 103 | unsigned int i; |
105 | 104 | |
106 | 105 | |
107 | 106 | |
108 | 107 | |
109 | 108 | |
110 | 109 | |
... | ... | @@ -106,21 +105,21 @@ |
106 | 105 | |
107 | 106 | for (i = 0; i < NR_counter; i++) { |
108 | 107 | snprintf(filename, sizeof(filename), "%u", i); |
109 | - dir = oprofilefs_mkdir(sb, root, filename); | |
108 | + dir = oprofilefs_mkdir(root->d_sb, root, filename); | |
110 | 109 | |
111 | - oprofilefs_create_ulong(sb, dir, "enabled", | |
110 | + oprofilefs_create_ulong(root->d_sb, dir, "enabled", | |
112 | 111 | &counter[i].enabled); |
113 | - oprofilefs_create_ulong(sb, dir, "event", | |
112 | + oprofilefs_create_ulong(root->d_sb, dir, "event", | |
114 | 113 | &counter[i].event); |
115 | - oprofilefs_create_ulong(sb, dir, "count", | |
114 | + oprofilefs_create_ulong(root->d_sb, dir, "count", | |
116 | 115 | &counter[i].count); |
117 | 116 | |
118 | 117 | /* Dummy entries */ |
119 | - oprofilefs_create_ulong(sb, dir, "kernel", | |
118 | + oprofilefs_create_ulong(root->d_sb, dir, "kernel", | |
120 | 119 | &counter[i].kernel); |
121 | - oprofilefs_create_ulong(sb, dir, "user", | |
120 | + oprofilefs_create_ulong(root->d_sb, dir, "user", | |
122 | 121 | &counter[i].user); |
123 | - oprofilefs_create_ulong(sb, dir, "unit_mask", | |
122 | + oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", | |
124 | 123 | &counter[i].unit_mask); |
125 | 124 | } |
126 | 125 |
arch/mips/oprofile/common.c
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | return 0; |
34 | 34 | } |
35 | 35 | |
36 | -static int op_mips_create_files(struct super_block *sb, struct dentry *root) | |
36 | +static int op_mips_create_files(struct dentry *root) | |
37 | 37 | { |
38 | 38 | int i; |
39 | 39 | |
40 | 40 | |
41 | 41 | |
... | ... | @@ -42,16 +42,16 @@ |
42 | 42 | char buf[4]; |
43 | 43 | |
44 | 44 | snprintf(buf, sizeof buf, "%d", i); |
45 | - dir = oprofilefs_mkdir(sb, root, buf); | |
45 | + dir = oprofilefs_mkdir(root->d_sb, root, buf); | |
46 | 46 | |
47 | - oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); | |
48 | - oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); | |
49 | - oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); | |
50 | - oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); | |
51 | - oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); | |
52 | - oprofilefs_create_ulong(sb, dir, "exl", &ctr[i].exl); | |
47 | + oprofilefs_create_ulong(root->d_sb, dir, "enabled", &ctr[i].enabled); | |
48 | + oprofilefs_create_ulong(root->d_sb, dir, "event", &ctr[i].event); | |
49 | + oprofilefs_create_ulong(root->d_sb, dir, "count", &ctr[i].count); | |
50 | + oprofilefs_create_ulong(root->d_sb, dir, "kernel", &ctr[i].kernel); | |
51 | + oprofilefs_create_ulong(root->d_sb, dir, "user", &ctr[i].user); | |
52 | + oprofilefs_create_ulong(root->d_sb, dir, "exl", &ctr[i].exl); | |
53 | 53 | /* Dummy. */ |
54 | - oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); | |
54 | + oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &ctr[i].unit_mask); | |
55 | 55 | } |
56 | 56 | |
57 | 57 | return 0; |
arch/powerpc/oprofile/common.c
... | ... | @@ -119,7 +119,7 @@ |
119 | 119 | model->global_stop(); |
120 | 120 | } |
121 | 121 | |
122 | -static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) | |
122 | +static int op_powerpc_create_files(struct dentry *root) | |
123 | 123 | { |
124 | 124 | int i; |
125 | 125 | |
... | ... | @@ -128,9 +128,9 @@ |
128 | 128 | * There is one mmcr0, mmcr1 and mmcra for setting the events for |
129 | 129 | * all of the counters. |
130 | 130 | */ |
131 | - oprofilefs_create_ulong(sb, root, "mmcr0", &sys.mmcr0); | |
132 | - oprofilefs_create_ulong(sb, root, "mmcr1", &sys.mmcr1); | |
133 | - oprofilefs_create_ulong(sb, root, "mmcra", &sys.mmcra); | |
131 | + oprofilefs_create_ulong(root->d_sb, root, "mmcr0", &sys.mmcr0); | |
132 | + oprofilefs_create_ulong(root->d_sb, root, "mmcr1", &sys.mmcr1); | |
133 | + oprofilefs_create_ulong(root->d_sb, root, "mmcra", &sys.mmcra); | |
134 | 134 | #ifdef CONFIG_OPROFILE_CELL |
135 | 135 | /* create a file the user tool can check to see what level of profiling |
136 | 136 | * support exits with this kernel. Initialize bit mask to indicate |
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | * If the file does not exist, then the kernel only supports SPU |
143 | 143 | * cycle profiling, PPU event and cycle profiling. |
144 | 144 | */ |
145 | - oprofilefs_create_ulong(sb, root, "cell_support", &sys.cell_support); | |
145 | + oprofilefs_create_ulong(root->d_sb, root, "cell_support", &sys.cell_support); | |
146 | 146 | sys.cell_support = 0x1; /* Note, the user OProfile tool must check |
147 | 147 | * that this bit is set before attempting to |
148 | 148 | * user SPU event profiling. Older kernels |
149 | 149 | |
... | ... | @@ -160,11 +160,11 @@ |
160 | 160 | char buf[4]; |
161 | 161 | |
162 | 162 | snprintf(buf, sizeof buf, "%d", i); |
163 | - dir = oprofilefs_mkdir(sb, root, buf); | |
163 | + dir = oprofilefs_mkdir(root->d_sb, root, buf); | |
164 | 164 | |
165 | - oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); | |
166 | - oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); | |
167 | - oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); | |
165 | + oprofilefs_create_ulong(root->d_sb, dir, "enabled", &ctr[i].enabled); | |
166 | + oprofilefs_create_ulong(root->d_sb, dir, "event", &ctr[i].event); | |
167 | + oprofilefs_create_ulong(root->d_sb, dir, "count", &ctr[i].count); | |
168 | 168 | |
169 | 169 | /* |
170 | 170 | * Classic PowerPC doesn't support per-counter |
171 | 171 | |
172 | 172 | |
... | ... | @@ -173,14 +173,14 @@ |
173 | 173 | * Book-E style performance monitors, we do |
174 | 174 | * support them. |
175 | 175 | */ |
176 | - oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); | |
177 | - oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); | |
176 | + oprofilefs_create_ulong(root->d_sb, dir, "kernel", &ctr[i].kernel); | |
177 | + oprofilefs_create_ulong(root->d_sb, dir, "user", &ctr[i].user); | |
178 | 178 | |
179 | - oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); | |
179 | + oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &ctr[i].unit_mask); | |
180 | 180 | } |
181 | 181 | |
182 | - oprofilefs_create_ulong(sb, root, "enable_kernel", &sys.enable_kernel); | |
183 | - oprofilefs_create_ulong(sb, root, "enable_user", &sys.enable_user); | |
182 | + oprofilefs_create_ulong(root->d_sb, root, "enable_kernel", &sys.enable_kernel); | |
183 | + oprofilefs_create_ulong(root->d_sb, root, "enable_user", &sys.enable_user); | |
184 | 184 | |
185 | 185 | /* Default to tracing both kernel and user */ |
186 | 186 | sys.enable_kernel = 1; |
arch/s390/oprofile/init.c
... | ... | @@ -346,16 +346,15 @@ |
346 | 346 | }; |
347 | 347 | |
348 | 348 | |
349 | -static int oprofile_create_hwsampling_files(struct super_block *sb, | |
350 | - struct dentry *root) | |
349 | +static int oprofile_create_hwsampling_files(struct dentry *root) | |
351 | 350 | { |
352 | 351 | struct dentry *dir; |
353 | 352 | |
354 | - dir = oprofilefs_mkdir(sb, root, "timer"); | |
353 | + dir = oprofilefs_mkdir(root->d_sb, root, "timer"); | |
355 | 354 | if (!dir) |
356 | 355 | return -EINVAL; |
357 | 356 | |
358 | - oprofilefs_create_file(sb, dir, "enabled", &timer_enabled_fops); | |
357 | + oprofilefs_create_file(root->d_sb, dir, "enabled", &timer_enabled_fops); | |
359 | 358 | |
360 | 359 | if (!hwsampler_available) |
361 | 360 | return 0; |
362 | 361 | |
... | ... | @@ -376,17 +375,17 @@ |
376 | 375 | * and can only be set to 0. |
377 | 376 | */ |
378 | 377 | |
379 | - dir = oprofilefs_mkdir(sb, root, "0"); | |
378 | + dir = oprofilefs_mkdir(root->d_sb, root, "0"); | |
380 | 379 | if (!dir) |
381 | 380 | return -EINVAL; |
382 | 381 | |
383 | - oprofilefs_create_file(sb, dir, "enabled", &hwsampler_fops); | |
384 | - oprofilefs_create_file(sb, dir, "event", &zero_fops); | |
385 | - oprofilefs_create_file(sb, dir, "count", &hw_interval_fops); | |
386 | - oprofilefs_create_file(sb, dir, "unit_mask", &zero_fops); | |
387 | - oprofilefs_create_file(sb, dir, "kernel", &kernel_fops); | |
388 | - oprofilefs_create_file(sb, dir, "user", &user_fops); | |
389 | - oprofilefs_create_ulong(sb, dir, "hw_sdbt_blocks", | |
382 | + oprofilefs_create_file(root->d_sb, dir, "enabled", &hwsampler_fops); | |
383 | + oprofilefs_create_file(root->d_sb, dir, "event", &zero_fops); | |
384 | + oprofilefs_create_file(root->d_sb, dir, "count", &hw_interval_fops); | |
385 | + oprofilefs_create_file(root->d_sb, dir, "unit_mask", &zero_fops); | |
386 | + oprofilefs_create_file(root->d_sb, dir, "kernel", &kernel_fops); | |
387 | + oprofilefs_create_file(root->d_sb, dir, "user", &user_fops); | |
388 | + oprofilefs_create_ulong(root->d_sb, dir, "hw_sdbt_blocks", | |
390 | 389 | &oprofile_sdbt_blocks); |
391 | 390 | |
392 | 391 | } else { |
393 | 392 | |
394 | 393 | |
395 | 394 | |
396 | 395 | |
397 | 396 | |
... | ... | @@ -396,19 +395,19 @@ |
396 | 395 | * space tools. The /dev/oprofile/hwsampling fs is |
397 | 396 | * provided in that case. |
398 | 397 | */ |
399 | - dir = oprofilefs_mkdir(sb, root, "hwsampling"); | |
398 | + dir = oprofilefs_mkdir(root->d_sb, root, "hwsampling"); | |
400 | 399 | if (!dir) |
401 | 400 | return -EINVAL; |
402 | 401 | |
403 | - oprofilefs_create_file(sb, dir, "hwsampler", | |
402 | + oprofilefs_create_file(root->d_sb, dir, "hwsampler", | |
404 | 403 | &hwsampler_fops); |
405 | - oprofilefs_create_file(sb, dir, "hw_interval", | |
404 | + oprofilefs_create_file(root->d_sb, dir, "hw_interval", | |
406 | 405 | &hw_interval_fops); |
407 | - oprofilefs_create_ro_ulong(sb, dir, "hw_min_interval", | |
406 | + oprofilefs_create_ro_ulong(root->d_sb, dir, "hw_min_interval", | |
408 | 407 | &oprofile_min_interval); |
409 | - oprofilefs_create_ro_ulong(sb, dir, "hw_max_interval", | |
408 | + oprofilefs_create_ro_ulong(root->d_sb, dir, "hw_max_interval", | |
410 | 409 | &oprofile_max_interval); |
411 | - oprofilefs_create_ulong(sb, dir, "hw_sdbt_blocks", | |
410 | + oprofilefs_create_ulong(root->d_sb, dir, "hw_sdbt_blocks", | |
412 | 411 | &oprofile_sdbt_blocks); |
413 | 412 | } |
414 | 413 | return 0; |
arch/x86/oprofile/nmi_int.c
... | ... | @@ -403,7 +403,7 @@ |
403 | 403 | nmi_cpu_shutdown(dummy); |
404 | 404 | } |
405 | 405 | |
406 | -static int nmi_create_files(struct super_block *sb, struct dentry *root) | |
406 | +static int nmi_create_files(struct dentry *root) | |
407 | 407 | { |
408 | 408 | unsigned int i; |
409 | 409 | |
... | ... | @@ -420,14 +420,14 @@ |
420 | 420 | continue; |
421 | 421 | |
422 | 422 | snprintf(buf, sizeof(buf), "%d", i); |
423 | - dir = oprofilefs_mkdir(sb, root, buf); | |
424 | - oprofilefs_create_ulong(sb, dir, "enabled", &counter_config[i].enabled); | |
425 | - oprofilefs_create_ulong(sb, dir, "event", &counter_config[i].event); | |
426 | - oprofilefs_create_ulong(sb, dir, "count", &counter_config[i].count); | |
427 | - oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); | |
428 | - oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); | |
429 | - oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); | |
430 | - oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra); | |
423 | + dir = oprofilefs_mkdir(root->d_sb, root, buf); | |
424 | + oprofilefs_create_ulong(root->d_sb, dir, "enabled", &counter_config[i].enabled); | |
425 | + oprofilefs_create_ulong(root->d_sb, dir, "event", &counter_config[i].event); | |
426 | + oprofilefs_create_ulong(root->d_sb, dir, "count", &counter_config[i].count); | |
427 | + oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &counter_config[i].unit_mask); | |
428 | + oprofilefs_create_ulong(root->d_sb, dir, "kernel", &counter_config[i].kernel); | |
429 | + oprofilefs_create_ulong(root->d_sb, dir, "user", &counter_config[i].user); | |
430 | + oprofilefs_create_ulong(root->d_sb, dir, "extra", &counter_config[i].extra); | |
431 | 431 | } |
432 | 432 | |
433 | 433 | return 0; |
arch/x86/oprofile/op_model_amd.c
... | ... | @@ -454,16 +454,16 @@ |
454 | 454 | printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", ibs_caps); |
455 | 455 | } |
456 | 456 | |
457 | -static int (*create_arch_files)(struct super_block *sb, struct dentry *root); | |
457 | +static int (*create_arch_files)(struct dentry *root); | |
458 | 458 | |
459 | -static int setup_ibs_files(struct super_block *sb, struct dentry *root) | |
459 | +static int setup_ibs_files(struct dentry *root) | |
460 | 460 | { |
461 | 461 | struct dentry *dir; |
462 | 462 | int ret = 0; |
463 | 463 | |
464 | 464 | /* architecture specific files */ |
465 | 465 | if (create_arch_files) |
466 | - ret = create_arch_files(sb, root); | |
466 | + ret = create_arch_files(root); | |
467 | 467 | |
468 | 468 | if (ret) |
469 | 469 | return ret; |
470 | 470 | |
471 | 471 | |
472 | 472 | |
473 | 473 | |
474 | 474 | |
475 | 475 | |
... | ... | @@ -479,26 +479,26 @@ |
479 | 479 | ibs_config.max_cnt_op = 250000; |
480 | 480 | |
481 | 481 | if (ibs_caps & IBS_CAPS_FETCHSAM) { |
482 | - dir = oprofilefs_mkdir(sb, root, "ibs_fetch"); | |
483 | - oprofilefs_create_ulong(sb, dir, "enable", | |
482 | + dir = oprofilefs_mkdir(root->d_sb, root, "ibs_fetch"); | |
483 | + oprofilefs_create_ulong(root->d_sb, dir, "enable", | |
484 | 484 | &ibs_config.fetch_enabled); |
485 | - oprofilefs_create_ulong(sb, dir, "max_count", | |
485 | + oprofilefs_create_ulong(root->d_sb, dir, "max_count", | |
486 | 486 | &ibs_config.max_cnt_fetch); |
487 | - oprofilefs_create_ulong(sb, dir, "rand_enable", | |
487 | + oprofilefs_create_ulong(root->d_sb, dir, "rand_enable", | |
488 | 488 | &ibs_config.rand_en); |
489 | 489 | } |
490 | 490 | |
491 | 491 | if (ibs_caps & IBS_CAPS_OPSAM) { |
492 | - dir = oprofilefs_mkdir(sb, root, "ibs_op"); | |
493 | - oprofilefs_create_ulong(sb, dir, "enable", | |
492 | + dir = oprofilefs_mkdir(root->d_sb, root, "ibs_op"); | |
493 | + oprofilefs_create_ulong(root->d_sb, dir, "enable", | |
494 | 494 | &ibs_config.op_enabled); |
495 | - oprofilefs_create_ulong(sb, dir, "max_count", | |
495 | + oprofilefs_create_ulong(root->d_sb, dir, "max_count", | |
496 | 496 | &ibs_config.max_cnt_op); |
497 | 497 | if (ibs_caps & IBS_CAPS_OPCNT) |
498 | - oprofilefs_create_ulong(sb, dir, "dispatched_ops", | |
498 | + oprofilefs_create_ulong(root->d_sb, dir, "dispatched_ops", | |
499 | 499 | &ibs_config.dispatched_ops); |
500 | 500 | if (ibs_caps & IBS_CAPS_BRNTRGT) |
501 | - oprofilefs_create_ulong(sb, dir, "branch_target", | |
501 | + oprofilefs_create_ulong(root->d_sb, dir, "branch_target", | |
502 | 502 | &ibs_config.branch_target); |
503 | 503 | } |
504 | 504 |
drivers/oprofile/oprofile_files.c
drivers/oprofile/oprofile_perf.c
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | op_destroy_counter(cpu, event); |
139 | 139 | } |
140 | 140 | |
141 | -static int oprofile_perf_create_files(struct super_block *sb, struct dentry *root) | |
141 | +static int oprofile_perf_create_files(struct dentry *root) | |
142 | 142 | { |
143 | 143 | unsigned int i; |
144 | 144 | |
... | ... | @@ -147,13 +147,13 @@ |
147 | 147 | char buf[4]; |
148 | 148 | |
149 | 149 | snprintf(buf, sizeof buf, "%d", i); |
150 | - dir = oprofilefs_mkdir(sb, root, buf); | |
151 | - oprofilefs_create_ulong(sb, dir, "enabled", &counter_config[i].enabled); | |
152 | - oprofilefs_create_ulong(sb, dir, "event", &counter_config[i].event); | |
153 | - oprofilefs_create_ulong(sb, dir, "count", &counter_config[i].count); | |
154 | - oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); | |
155 | - oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); | |
156 | - oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); | |
150 | + dir = oprofilefs_mkdir(root->d_sb, root, buf); | |
151 | + oprofilefs_create_ulong(root->d_sb, dir, "enabled", &counter_config[i].enabled); | |
152 | + oprofilefs_create_ulong(root->d_sb, dir, "event", &counter_config[i].event); | |
153 | + oprofilefs_create_ulong(root->d_sb, dir, "count", &counter_config[i].count); | |
154 | + oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &counter_config[i].unit_mask); | |
155 | + oprofilefs_create_ulong(root->d_sb, dir, "kernel", &counter_config[i].kernel); | |
156 | + oprofilefs_create_ulong(root->d_sb, dir, "user", &counter_config[i].user); | |
157 | 157 | } |
158 | 158 | |
159 | 159 | return 0; |
include/linux/oprofile.h
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | struct oprofile_operations { |
52 | 52 | /* create any necessary configuration files in the oprofile fs. |
53 | 53 | * Optional. */ |
54 | - int (*create_files)(struct super_block * sb, struct dentry * root); | |
54 | + int (*create_files)(struct dentry * root); | |
55 | 55 | /* Do any necessary interrupt setup. Optional. */ |
56 | 56 | int (*setup)(void); |
57 | 57 | /* Do any necessary interrupt shutdown. Optional. */ |