[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200701212751.GL2786714@ZenIV.linux.org.uk>
Date: Wed, 1 Jul 2020 22:27:51 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Christoph Hellwig <hch@....de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 17/23] proc: add a read_iter method to proc proc_ops
On Wed, Jul 01, 2020 at 10:09:45PM +0200, Christoph Hellwig wrote:
> This will allow proc files to implement iter read semantics.
*UGH*
You are introducing file_operations with both ->read() and ->read_iter();
worse, in some cases they are not equivalent. Sure, ->read() takes
precedence right now, but... why not a separate file_operations for
->read_iter-capable files?
I really hate the fallbacks of that sort - they tend to be brittle
as hell. And while we are at it, I'm not sure that your iter_read()
has good cause to be non-static.
Powered by blists - more mailing lists