From: Frederic Weisbecker <fweisbec@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, John Kacur <jkacur@redhat.com>,
Christoph Hellwig <hch@lst.de>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH 09/18] tracing: use generic_file_llseek for debugfs
Date: Wed, 7 Jul 2010 23:58:44 +0200 [thread overview]
Message-ID: <20100707215838.GA5420@nowhere> (raw)
In-Reply-To: <1278538820-1392-10-git-send-email-arnd@arndb.de>
On Wed, Jul 07, 2010 at 11:40:11PM +0200, Arnd Bergmann wrote:
> The default for llseek will change to no_llseek,
> so the tracing debugfs files need to add explicit
> .llseek assignments. Since we're dealing with regular
> files from a VFS perspective, use generic_file_llseek.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> ---
> kernel/trace/trace.c | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 086d363..de3d6b3 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -2394,6 +2394,7 @@ static const struct file_operations show_traces_fops = {
> .open = show_traces_open,
> .read = seq_read,
> .release = seq_release,
> + .llseek = seq_lseek,
> };
>
> /*
> @@ -2487,6 +2488,7 @@ static const struct file_operations tracing_cpumask_fops = {
> .open = tracing_open_generic,
> .read = tracing_cpumask_read,
> .write = tracing_cpumask_write,
> + .llseek = generic_file_llseek,
> };
>
> static int tracing_trace_options_show(struct seq_file *m, void *v)
> @@ -2653,6 +2655,7 @@ tracing_readme_read(struct file *filp, char __user *ubuf,
> static const struct file_operations tracing_readme_fops = {
> .open = tracing_open_generic,
> .read = tracing_readme_read,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t
> @@ -2703,6 +2706,7 @@ tracing_saved_cmdlines_read(struct file *file, char __user *ubuf,
> static const struct file_operations tracing_saved_cmdlines_fops = {
> .open = tracing_open_generic,
> .read = tracing_saved_cmdlines_read,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t
> @@ -3032,6 +3036,7 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)
> if (iter->trace->pipe_open)
> iter->trace->pipe_open(iter);
>
> + nonseekable_open(inode, filp);
> out:
> mutex_unlock(&trace_types_lock);
> return ret;
> @@ -3590,18 +3595,21 @@ static const struct file_operations tracing_max_lat_fops = {
> .open = tracing_open_generic,
> .read = tracing_max_lat_read,
> .write = tracing_max_lat_write,
> + .llseek = generic_file_llseek,
> };
>
> static const struct file_operations tracing_ctrl_fops = {
> .open = tracing_open_generic,
> .read = tracing_ctrl_read,
> .write = tracing_ctrl_write,
> + .llseek = generic_file_llseek,
> };
>
> static const struct file_operations set_tracer_fops = {
> .open = tracing_open_generic,
> .read = tracing_set_trace_read,
> .write = tracing_set_trace_write,
> + .llseek = generic_file_llseek,
> };
>
> static const struct file_operations tracing_pipe_fops = {
> @@ -3610,17 +3618,20 @@ static const struct file_operations tracing_pipe_fops = {
> .read = tracing_read_pipe,
> .splice_read = tracing_splice_read_pipe,
> .release = tracing_release_pipe,
> + .llseek = no_llseek,
If you use nonseekable_open you don't need no_llseek there. That said I'm
all for keeping this as it's easier to grep fops that lack a proper llseek
callback with that.
> };
>
> static const struct file_operations tracing_entries_fops = {
> .open = tracing_open_generic,
> .read = tracing_entries_read,
> .write = tracing_entries_write,
> + .llseek = generic_file_llseek,
> };
>
> static const struct file_operations tracing_mark_fops = {
> .open = tracing_open_generic,
> .write = tracing_mark_write,
> + .llseek = generic_file_llseek,
> };
>
> static const struct file_operations trace_clock_fops = {
> @@ -3926,6 +3937,7 @@ tracing_stats_read(struct file *filp, char __user *ubuf,
> static const struct file_operations tracing_stats_fops = {
> .open = tracing_open_generic,
> .read = tracing_stats_read,
> + .llseek = generic_file_llseek,
> };
>
> #ifdef CONFIG_DYNAMIC_FTRACE
> @@ -3962,6 +3974,7 @@ tracing_read_dyn_info(struct file *filp, char __user *ubuf,
> static const struct file_operations tracing_dyn_info_fops = {
> .open = tracing_open_generic,
> .read = tracing_read_dyn_info,
> + .llseek = generic_file_llseek,
> };
> #endif
>
> @@ -4115,6 +4128,7 @@ static const struct file_operations trace_options_fops = {
> .open = tracing_open_generic,
> .read = trace_options_read,
> .write = trace_options_write,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t
> @@ -4166,6 +4180,7 @@ static const struct file_operations trace_options_core_fops = {
> .open = tracing_open_generic,
> .read = trace_options_core_read,
> .write = trace_options_core_write,
> + .llseek = generic_file_llseek,
> };
>
> struct dentry *trace_create_file(const char *name,
> --
> 1.7.1
>
Applied, thanks Arnd!
next prev parent reply other threads:[~2010-07-07 21:58 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 21:40 [PATCH 00/18] VFS: turn no_llseek into the default Arnd Bergmann
2010-07-07 21:40 ` [PATCH 01/18] drm: use noop_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 02/18] net/wireless: use generic_file_llseek in debugfs Arnd Bergmann
2010-07-07 21:40 ` [PATCH 03/18] lkdtm: " Arnd Bergmann
2010-07-22 0:06 ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 04/18] ib/qib: use generic_file_llseek Arnd Bergmann
2010-07-21 18:40 ` Roland Dreier
2010-07-07 21:40 ` [PATCH 05/18] arm/omap: use generic_file_llseek in iommu_debug Arnd Bergmann
2010-07-07 21:40 ` [PATCH 06/18] spufs: use llseek in all file operations Arnd Bergmann
2010-07-08 1:15 ` Jeremy Kerr
2010-07-08 13:02 ` Arnd Bergmann
2010-07-08 13:29 ` [PATCH v2] " Arnd Bergmann
2010-07-07 21:40 ` [PATCH 07/18] staging: " Arnd Bergmann
2010-07-07 21:40 ` [PATCH 08/18] selinux: use generic_file_llseek Arnd Bergmann
2010-07-08 14:52 ` Eric Paris
2010-07-11 23:44 ` James Morris
2010-07-07 21:40 ` [PATCH 09/18] tracing: use generic_file_llseek for debugfs Arnd Bergmann
2010-07-07 21:58 ` Frederic Weisbecker [this message]
2010-07-21 20:52 ` [tip:perf/core] tracing: Use " tip-bot for Arnd Bergmann
2010-07-07 21:40 ` [PATCH 10/18] ibmasmfs: use generic_file_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 11/18] oprofile: make event buffer nonseekable Arnd Bergmann
2010-07-09 7:51 ` Robert Richter
2010-07-26 9:06 ` Robert Richter
2010-07-07 21:40 ` [PATCH 12/18] raw: use explicit llseek file operations Arnd Bergmann
2010-07-21 23:50 ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 13/18] ima: use generic_file_llseek for securityfs Arnd Bergmann
2010-07-08 12:50 ` Mimi Zohar
2010-07-08 13:00 ` Arnd Bergmann
2010-07-08 13:18 ` Mimi Zohar
2010-07-08 22:52 ` James Morris
2010-07-09 13:00 ` Arnd Bergmann
2010-07-11 23:45 ` James Morris
2010-07-07 21:40 ` [PATCH 14/18] irda/irnet: use noop_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 15/18] viotape: " Arnd Bergmann
2010-07-21 23:59 ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 16/18] llseek: automatically add .llseek fop Arnd Bergmann
2010-07-07 21:55 ` Mike Frysinger
2010-07-07 22:10 ` Arnd Bergmann
2010-07-08 12:17 ` Boaz Harrosh
2010-07-08 12:23 ` Arnd Bergmann
2010-07-08 12:32 ` Boaz Harrosh
2010-07-07 21:40 ` [PATCH 17/18] vfs: don't use BKL in default_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 18/18] vfs: make no_llseek the default Arnd Bergmann
2010-07-08 11:25 ` Tetsuo Handa
2010-07-08 12:08 ` Arnd Bergmann
2010-07-08 12:57 ` Tetsuo Handa
2010-07-08 13:18 ` Arnd Bergmann
2010-07-08 22:55 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100707215838.GA5420@nowhere \
--to=fweisbec@gmail.com \
--cc=arnd@arndb.de \
--cc=hch@lst.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox