summaryrefslogtreecommitdiffstats
path: root/drivers/oprofile
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-07-19 16:10:36 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-03 22:52:48 -0400
commit6af4ea0ba708172be8caf1ba5047b2b8a9d2fea3 (patch)
treeb52fe5f7e6a811184f2379bc6bab3d4b6d2e6520 /drivers/oprofile
parentecde28237e10de3750a97579f42bc2ec65b8a0e1 (diff)
downloadlinux-6af4ea0ba708172be8caf1ba5047b2b8a9d2fea3.tar.bz2
oprofilefs_create_...() do not need superblock argument
same story as with oprofilefs_mkdir() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/oprofile')
-rw-r--r--drivers/oprofile/oprofile_files.c20
-rw-r--r--drivers/oprofile/oprofile_perf.c12
-rw-r--r--drivers/oprofile/oprofile_stats.c18
-rw-r--r--drivers/oprofile/oprofilefs.c27
4 files changed, 38 insertions, 39 deletions
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c
index 07462a9af615..ee2cfce358b9 100644
--- a/drivers/oprofile/oprofile_files.c
+++ b/drivers/oprofile/oprofile_files.c
@@ -183,17 +183,17 @@ void oprofile_create_files(struct dentry *root)
oprofile_buffer_watershed = BUFFER_WATERSHED_DEFAULT;
oprofile_time_slice = msecs_to_jiffies(TIME_SLICE_DEFAULT);
- oprofilefs_create_file(root->d_sb, root, "enable", &enable_fops);
- oprofilefs_create_file_perm(root->d_sb, root, "dump", &dump_fops, 0666);
- oprofilefs_create_file(root->d_sb, root, "buffer", &event_buffer_fops);
- oprofilefs_create_ulong(root->d_sb, root, "buffer_size", &oprofile_buffer_size);
- oprofilefs_create_ulong(root->d_sb, root, "buffer_watershed", &oprofile_buffer_watershed);
- oprofilefs_create_ulong(root->d_sb, root, "cpu_buffer_size", &oprofile_cpu_buffer_size);
- oprofilefs_create_file(root->d_sb, root, "cpu_type", &cpu_type_fops);
- oprofilefs_create_file(root->d_sb, root, "backtrace_depth", &depth_fops);
- oprofilefs_create_file(root->d_sb, root, "pointer_size", &pointer_size_fops);
+ oprofilefs_create_file(root, "enable", &enable_fops);
+ oprofilefs_create_file_perm(root, "dump", &dump_fops, 0666);
+ oprofilefs_create_file(root, "buffer", &event_buffer_fops);
+ oprofilefs_create_ulong(root, "buffer_size", &oprofile_buffer_size);
+ oprofilefs_create_ulong(root, "buffer_watershed", &oprofile_buffer_watershed);
+ oprofilefs_create_ulong(root, "cpu_buffer_size", &oprofile_cpu_buffer_size);
+ oprofilefs_create_file(root, "cpu_type", &cpu_type_fops);
+ oprofilefs_create_file(root, "backtrace_depth", &depth_fops);
+ oprofilefs_create_file(root, "pointer_size", &pointer_size_fops);
#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
- oprofilefs_create_file(root->d_sb, root, "time_slice", &timeout_fops);
+ oprofilefs_create_file(root, "time_slice", &timeout_fops);
#endif
oprofile_create_stats_files(root);
if (oprofile_ops.create_files)
diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
index 923a245774fa..d5b2732b1b81 100644
--- a/drivers/oprofile/oprofile_perf.c
+++ b/drivers/oprofile/oprofile_perf.c
@@ -148,12 +148,12 @@ static int oprofile_perf_create_files(struct dentry *root)
snprintf(buf, sizeof buf, "%d", i);
dir = oprofilefs_mkdir(root, buf);
- oprofilefs_create_ulong(root->d_sb, dir, "enabled", &counter_config[i].enabled);
- oprofilefs_create_ulong(root->d_sb, dir, "event", &counter_config[i].event);
- oprofilefs_create_ulong(root->d_sb, dir, "count", &counter_config[i].count);
- oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &counter_config[i].unit_mask);
- oprofilefs_create_ulong(root->d_sb, dir, "kernel", &counter_config[i].kernel);
- oprofilefs_create_ulong(root->d_sb, dir, "user", &counter_config[i].user);
+ oprofilefs_create_ulong(dir, "enabled", &counter_config[i].enabled);
+ oprofilefs_create_ulong(dir, "event", &counter_config[i].event);
+ oprofilefs_create_ulong(dir, "count", &counter_config[i].count);
+ oprofilefs_create_ulong(dir, "unit_mask", &counter_config[i].unit_mask);
+ oprofilefs_create_ulong(dir, "kernel", &counter_config[i].kernel);
+ oprofilefs_create_ulong(dir, "user", &counter_config[i].user);
}
return 0;
diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c
index 8cf2fa9710a4..59659cea4582 100644
--- a/drivers/oprofile/oprofile_stats.c
+++ b/drivers/oprofile/oprofile_stats.c
@@ -59,26 +59,26 @@ void oprofile_create_stats_files(struct dentry *root)
* but we can't simply lock them, and they are
* informational only.
*/
- oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_received",
+ oprofilefs_create_ro_ulong(cpudir, "sample_received",
&cpu_buf->sample_received);
- oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_lost_overflow",
+ oprofilefs_create_ro_ulong(cpudir, "sample_lost_overflow",
&cpu_buf->sample_lost_overflow);
- oprofilefs_create_ro_ulong(root->d_sb, cpudir, "backtrace_aborted",
+ oprofilefs_create_ro_ulong(cpudir, "backtrace_aborted",
&cpu_buf->backtrace_aborted);
- oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_invalid_eip",
+ oprofilefs_create_ro_ulong(cpudir, "sample_invalid_eip",
&cpu_buf->sample_invalid_eip);
}
- oprofilefs_create_ro_atomic(root->d_sb, dir, "sample_lost_no_mm",
+ oprofilefs_create_ro_atomic(dir, "sample_lost_no_mm",
&oprofile_stats.sample_lost_no_mm);
- oprofilefs_create_ro_atomic(root->d_sb, dir, "sample_lost_no_mapping",
+ oprofilefs_create_ro_atomic(dir, "sample_lost_no_mapping",
&oprofile_stats.sample_lost_no_mapping);
- oprofilefs_create_ro_atomic(root->d_sb, dir, "event_lost_overflow",
+ oprofilefs_create_ro_atomic(dir, "event_lost_overflow",
&oprofile_stats.event_lost_overflow);
- oprofilefs_create_ro_atomic(root->d_sb, dir, "bt_lost_no_mapping",
+ oprofilefs_create_ro_atomic(dir, "bt_lost_no_mapping",
&oprofile_stats.bt_lost_no_mapping);
#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
- oprofilefs_create_ro_atomic(root->d_sb, dir, "multiplex_counter",
+ oprofilefs_create_ro_atomic(dir, "multiplex_counter",
&oprofile_stats.multiplex_counter);
#endif
}
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
index 6a345724637f..3f493459378f 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
@@ -132,9 +132,8 @@ static const struct file_operations ulong_ro_fops = {
};
-static int __oprofilefs_create_file(struct super_block *sb,
- struct dentry *root, char const *name, const struct file_operations *fops,
- int perm, void *priv)
+static int __oprofilefs_create_file(struct dentry *root, char const *name,
+ const struct file_operations *fops, int perm, void *priv)
{
struct dentry *dentry;
struct inode *inode;
@@ -145,7 +144,7 @@ static int __oprofilefs_create_file(struct super_block *sb,
mutex_unlock(&root->d_inode->i_mutex);
return -ENOMEM;
}
- inode = oprofilefs_get_inode(sb, S_IFREG | perm);
+ inode = oprofilefs_get_inode(root->d_sb, S_IFREG | perm);
if (!inode) {
dput(dentry);
mutex_unlock(&root->d_inode->i_mutex);
@@ -159,18 +158,18 @@ static int __oprofilefs_create_file(struct super_block *sb,
}
-int oprofilefs_create_ulong(struct super_block *sb, struct dentry *root,
+int oprofilefs_create_ulong(struct dentry *root,
char const *name, unsigned long *val)
{
- return __oprofilefs_create_file(sb, root, name,
+ return __oprofilefs_create_file(root, name,
&ulong_fops, 0644, val);
}
-int oprofilefs_create_ro_ulong(struct super_block *sb, struct dentry *root,
+int oprofilefs_create_ro_ulong(struct dentry *root,
char const *name, unsigned long *val)
{
- return __oprofilefs_create_file(sb, root, name,
+ return __oprofilefs_create_file(root, name,
&ulong_ro_fops, 0444, val);
}
@@ -189,25 +188,25 @@ static const struct file_operations atomic_ro_fops = {
};
-int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
+int oprofilefs_create_ro_atomic(struct dentry *root,
char const *name, atomic_t *val)
{
- return __oprofilefs_create_file(sb, root, name,
+ return __oprofilefs_create_file(root, name,
&atomic_ro_fops, 0444, val);
}
-int oprofilefs_create_file(struct super_block *sb, struct dentry *root,
+int oprofilefs_create_file(struct dentry *root,
char const *name, const struct file_operations *fops)
{
- return __oprofilefs_create_file(sb, root, name, fops, 0644, NULL);
+ return __oprofilefs_create_file(root, name, fops, 0644, NULL);
}
-int oprofilefs_create_file_perm(struct super_block *sb, struct dentry *root,
+int oprofilefs_create_file_perm(struct dentry *root,
char const *name, const struct file_operations *fops, int perm)
{
- return __oprofilefs_create_file(sb, root, name, fops, perm, NULL);
+ return __oprofilefs_create_file(root, name, fops, perm, NULL);
}