mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Anderson <anderson@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Josef Bacik <jbacik@redhat.com>
Subject: Re: [PATCH] fs: kill default_llseek
Date: Mon, 9 May 2011 14:03:58 -0400 (EDT)	[thread overview]
Message-ID: <1850345881.414857.1304964238493.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> (raw)


On Thursday 05 May 2011 16:27:57 Josef Bacik wrote:
> Looking at this llseek stuff I noticed that default_llseek is the exact same as
> generic_file_llseek, so kill default_llseek.  I patched this using spatch with
> just a simple
> 
> @@
> @@
> 
> - default_llseek
> + generic_file_llseek

...

> diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
> index d245cb2..6f37c39 100644
> --- a/fs/proc/kcore.c
> +++ b/fs/proc/kcore.c
> @@ -558,7 +558,7 @@ static int open_kcore(struct inode *inode, struct file *filp)
>  static const struct file_operations proc_kcore_operations = {
>  	.read		= read_kcore,
>  	.open		= open_kcore,
> -	.llseek		= default_llseek,
> +	.llseek		= generic_file_llseek,
>  };
 
> diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
> index 74802bc5..0cafd9e 100644
> --- a/fs/proc/vmcore.c
> +++ b/fs/proc/vmcore.c
> @@ -163,7 +163,7 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
>  
>  static const struct file_operations proc_vmcore_operations = {
>  	.read		= read_vmcore,
> -	.llseek		= default_llseek,
> +	.llseek		= generic_file_llseek,
>  };
 
Both /proc/kcore and /proc/vmcore currently require default_llseek().  
They were both changed to use generic_file_llseek(), but then subsequently
reverted back to default_llseek():

commit c227e69028473c7c7994a9b0a2cc0034f3f7e0fe
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Wed Sep 22 13:04:54 2010 -0700

    /proc/vmcore: fix seeking
    
    Commit 73296bc611 ("procfs: Use generic_file_llseek in /proc/vmcore")
    broke seeking on /proc/vmcore.  This changes it back to use default_llseek
    in order to restore the original behaviour.
    ...


commit ceff1a770933e2ca2bf995b453dade4ec47a9878
Author: Dave Anderson <anderson@redhat.com>
Date:   Wed Jan 12 17:00:36 2011 -0800

    /proc/kcore: fix seeking
    
    Commit 34aacb2920 ("procfs: Use generic_file_llseek in /proc/kcore") broke
    seeking on /proc/kcore.  This changes it back to use default_llseek in
    order to restore the original behavior.
    ...

Dave Anderson

             reply	other threads:[~2011-05-09 18:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 18:03 Dave Anderson [this message]
2011-05-09 18:11 ` Josef Bacik
2011-05-09 18:30   ` Dave Anderson
2011-05-09 18:47     ` Josef Bacik
  -- strict thread matches above, loose matches on Subject: below --
2011-05-05 14:27 Josef Bacik
2011-05-08 14:23 ` Arnd Bergmann
2011-05-09 13:23   ` Josef Bacik
2011-05-09 14:06     ` Christoph Hellwig

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=1850345881.414857.1304964238493.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com \
    --to=anderson@redhat.com \
    --cc=jbacik@redhat.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®