[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=widQ+oLHbm=wSrewpLgXJg_FWCZV3BERmaEAx+ZCMfmZg@mail.gmail.com>
Date: Wed, 20 Jan 2021 15:40:29 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Christoph Hellwig <hch@....de>,
Johannes Berg <johannes@...solutions.net>,
Oliver Giles <ohw.giles@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: Splicing to/from a tty
On Wed, Jan 20, 2021 at 3:14 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> Umm... Why do we clear FMODE_PWRITE there [seq_open - ed], anyway?
I think it's pointless and historical, and comes from "several /proc
files supported the simple single-write model, nothing ever supported
moving around and writing".
The seq_file stuff was always about reading, and then the writing part
was generally random special-case hacks on the side.
So I think that "clear PWRITE" thing is to make sure we get sane error
cases if somebody tries something funny, knowing that none of the
hacky stuff support it.
And then the very special kernfs thing adds it back in, because it
does in fact allow seeking writes.
Linus
Powered by blists - more mailing lists