public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] char/mem: only use {read,write}_iter, not the old {read,write} functions
Date: Fri, 20 May 2022 08:38:35 -0600	[thread overview]
Message-ID: <b1e7991f-b01e-b29c-954a-0d55e971840e@kernel.dk> (raw)
In-Reply-To: <20220520135030.166831-1-Jason@zx2c4.com>

On 5/20/22 7:50 AM, Jason A. Donenfeld wrote:
> Currently mem.c implements both the {read,write}_iter functions and the
> {read,write} functions. But with {read,write} going away at some point
> in the future, and most kernel code made to prefer {read,write}_iter,
> there's no point in keeping around the old code. Actually, this comment
> in __kernel_read() indicates that having both might be plain wrong:
> 
>         /*
>          * Also fail if ->read_iter and ->read are both wired up as that
>          * implies very convoluted semantics.
>          */
>         if (unlikely(!file->f_op->read_iter || file->f_op->read))
>                 return warn_unsupported(file, "read");

Nice, just another bit of wasted space due to not having clearly
defined iter vs non-iter.

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe


  reply	other threads:[~2022-05-20 14:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 13:50 [PATCH] char/mem: only use {read,write}_iter, not the old {read,write} functions Jason A. Donenfeld
2022-05-20 14:38 ` Jens Axboe [this message]
2022-05-20 15:09 ` Al Viro
2022-05-20 15:11   ` Jens Axboe
2022-05-20 15:32     ` Jens Axboe
2022-05-20 15:44       ` Al Viro
2022-05-20 15:46         ` Jens Axboe
2022-05-21 17:51         ` Al Viro
2022-05-20 15:24   ` Jason A. Donenfeld

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=b1e7991f-b01e-b29c-954a-0d55e971840e@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Jason@zx2c4.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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