public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jens Axboe <jens.axboe@oracle.com>, Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: set relay file can not be read by pread(2)
Date: Wed, 26 Mar 2008 20:14:28 -0700	[thread overview]
Message-ID: <20080326201428.95b4a3f6.akpm@linux-foundation.org> (raw)
In-Reply-To: <200803261859.m2QIx6rZ025917@hera.kernel.org>

On Wed, 26 Mar 2008 18:59:06 GMT Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:

> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=37529fe9f62835e1c11895a1895064748b032dc1
> Commit:     37529fe9f62835e1c11895a1895064748b032dc1
> Parent:     05dda977f2574c3341abef9b74c27d2b362e1e3a
> Author:     Lai Jiangshan <laijs@cn.fujitsu.com>
> AuthorDate: Wed Mar 26 12:01:28 2008 +0100
> Committer:  Jens Axboe <jens.axboe@oracle.com>
> CommitDate: Wed Mar 26 12:01:28 2008 +0100
> 
>     set relay file can not be read by pread(2)
>     
>     I found that relay files can be read by pread(2). I fix it,
>     for relay files are not capable of seeking.
>     
>     Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
>     Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> ---
>  kernel/relay.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/relay.c b/kernel/relay.c
> index 4c035a8..ed3f6cf 100644
> --- a/kernel/relay.c
> +++ b/kernel/relay.c
> @@ -736,7 +736,7 @@ static int relay_file_open(struct inode *inode, struct file *filp)
>  	kref_get(&buf->kref);
>  	filp->private_data = buf;
>  
> -	return 0;
> +	return nonseekable_open(inode, filp);
>  }

Does pread(..., ..., ..., offset=0) work correctly now?

Because if it does, then applications might be using that, and we just
broke them.


       reply	other threads:[~2008-03-27  3:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200803261859.m2QIx6rZ025917@hera.kernel.org>
2008-03-27  3:14 ` Andrew Morton [this message]
2008-03-27  4:19   ` set relay file can not be read by pread(2) Lai Jiangshan

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=20080326201428.95b4a3f6.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=laijs@cn.fujitsu.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