From 40437c718a69562bafaf9e5c9d17b6628e2576b1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 19 Jul 2013 15:54:56 +0400 Subject: don't bother with passing superblock to oprofile_create_stats_files() Signed-off-by: Al Viro --- drivers/oprofile/oprofile_stats.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'drivers/oprofile/oprofile_stats.c') diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c index 917d28ebeacd..627dce478311 100644 --- a/drivers/oprofile/oprofile_stats.c +++ b/drivers/oprofile/oprofile_stats.c @@ -38,7 +38,7 @@ void oprofile_reset_stats(void) } -void oprofile_create_stats_files(struct super_block *sb, struct dentry *root) +void oprofile_create_stats_files(struct dentry *root) { struct oprofile_cpu_buffer *cpu_buf; struct dentry *cpudir; @@ -46,39 +46,39 @@ void oprofile_create_stats_files(struct super_block *sb, struct dentry *root) char buf[10]; int i; - dir = oprofilefs_mkdir(sb, root, "stats"); + dir = oprofilefs_mkdir(root->d_sb, root, "stats"); if (!dir) return; for_each_possible_cpu(i) { cpu_buf = &per_cpu(op_cpu_buffer, i); snprintf(buf, 10, "cpu%d", i); - cpudir = oprofilefs_mkdir(sb, dir, buf); + cpudir = oprofilefs_mkdir(root->d_sb, dir, buf); /* Strictly speaking access to these ulongs is racy, * but we can't simply lock them, and they are * informational only. */ - oprofilefs_create_ro_ulong(sb, cpudir, "sample_received", + oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_received", &cpu_buf->sample_received); - oprofilefs_create_ro_ulong(sb, cpudir, "sample_lost_overflow", + oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_lost_overflow", &cpu_buf->sample_lost_overflow); - oprofilefs_create_ro_ulong(sb, cpudir, "backtrace_aborted", + oprofilefs_create_ro_ulong(root->d_sb, cpudir, "backtrace_aborted", &cpu_buf->backtrace_aborted); - oprofilefs_create_ro_ulong(sb, cpudir, "sample_invalid_eip", + oprofilefs_create_ro_ulong(root->d_sb, cpudir, "sample_invalid_eip", &cpu_buf->sample_invalid_eip); } - oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm", + oprofilefs_create_ro_atomic(root->d_sb, dir, "sample_lost_no_mm", &oprofile_stats.sample_lost_no_mm); - oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mapping", + oprofilefs_create_ro_atomic(root->d_sb, dir, "sample_lost_no_mapping", &oprofile_stats.sample_lost_no_mapping); - oprofilefs_create_ro_atomic(sb, dir, "event_lost_overflow", + oprofilefs_create_ro_atomic(root->d_sb, dir, "event_lost_overflow", &oprofile_stats.event_lost_overflow); - oprofilefs_create_ro_atomic(sb, dir, "bt_lost_no_mapping", + oprofilefs_create_ro_atomic(root->d_sb, dir, "bt_lost_no_mapping", &oprofile_stats.bt_lost_no_mapping); #ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX - oprofilefs_create_ro_atomic(sb, dir, "multiplex_counter", + oprofilefs_create_ro_atomic(root->d_sb, dir, "multiplex_counter", &oprofile_stats.multiplex_counter); #endif } -- cgit v1.2.3 From ecde28237e10de3750a97579f42bc2ec65b8a0e1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 19 Jul 2013 15:58:27 +0400 Subject: oprofilefs_mkdir() doesn't need superblock argument it's always equal to ->d_sb of the second argument (parent dentry), due to either being literally that, or ->d_sb of parent's parent. Signed-off-by: Al Viro --- drivers/oprofile/oprofile_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/oprofile/oprofile_stats.c') diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c index 627dce478311..8cf2fa9710a4 100644 --- a/drivers/oprofile/oprofile_stats.c +++ b/drivers/oprofile/oprofile_stats.c @@ -46,14 +46,14 @@ void oprofile_create_stats_files(struct dentry *root) char buf[10]; int i; - dir = oprofilefs_mkdir(root->d_sb, root, "stats"); + dir = oprofilefs_mkdir(root, "stats"); if (!dir) return; for_each_possible_cpu(i) { cpu_buf = &per_cpu(op_cpu_buffer, i); snprintf(buf, 10, "cpu%d", i); - cpudir = oprofilefs_mkdir(root->d_sb, dir, buf); + cpudir = oprofilefs_mkdir(dir, buf); /* Strictly speaking access to these ulongs is racy, * but we can't simply lock them, and they are -- cgit v1.2.3 From 6af4ea0ba708172be8caf1ba5047b2b8a9d2fea3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 19 Jul 2013 16:10:36 +0400 Subject: oprofilefs_create_...() do not need superblock argument same story as with oprofilefs_mkdir() Signed-off-by: Al Viro --- drivers/oprofile/oprofile_stats.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/oprofile/oprofile_stats.c') 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 } -- cgit v1.2.3