mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Paul Turner <pjt@google.com>,
	linux-kernel@vger.kernel.org, adobriyan@gmail.com,
	ebierderm@xmission.com, stable@kernel.org,
	Al Viro <viro@zeniv.linux.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] Separate FMODE_PREAD/FMODE_PWRITE into separate flags
Date: Wed, 4 Feb 2009 19:43:10 -0800	[thread overview]
Message-ID: <20090204194310.1d5e96ae.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090204194203.a2c652d2.akpm@linux-foundation.org>

On Wed, 4 Feb 2009 19:42:03 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:

> And I updated seq_file-properly-cope-with-pread.patch thusly:
> 
> --- a/fs/seq_file.c~seq_file-properly-cope-with-pread-fix
> +++ a/fs/seq_file.c
> @@ -48,6 +48,16 @@ int seq_open(struct file *file, const st
>  	 */
>  	file->f_version = 0;
>  
> +	/*
> +	 * seq_files support lseek() and pread().  They do not implement
> +	 * write() at all, but we clear FMODE_PWRITE here for historical
> +	 * reasons.
> +	 *
> +	 * If a client of seq_files a) implements file.write() and b) wishes to
> +	 * support pwrite() then that client will need to implement its own
> +	 * file.open() which calls seq_open() and then sets FMODE_WRITE.
                                                                  ^P
> +	 */
> +	file->f_mode &= ~FMODE_PWRITE;
>  	return 0;
>  }
>  EXPORT_SYMBOL(seq_open);

      reply	other threads:[~2009-02-05  3:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05  2:06 Paul Turner
2009-02-05  2:13 ` Paul Turner
2009-02-05  3:36 ` Andrew Morton
2009-02-05  3:42   ` Andrew Morton
2009-02-05  3:43     ` Andrew Morton [this message]

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=20090204194310.1d5e96ae.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=ebierderm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjt@google.com \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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®