io_uring: no read/write-retry on -EAGAIN error and O_NONBLOCK marked file
authorJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 15:30:31 +0000 (09:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:32 +0000 (19:14 +0200)
commitbf8fe7b755c2ccdf8fd739ad71dd0d035588511a
tree9a60235e263297a6f86caacd52c96eb79b4e084e
parenta8bf40a7538fbc9652457506fc3e5ca5c3228732
io_uring: no read/write-retry on -EAGAIN error and O_NONBLOCK marked file

commit 355afaeb578abac907217c256a844cfafb0337b2 upstream.

Actually two things that need fixing up here:

- The io_rw_reissue() -EAGAIN retry is explicit to block devices and
  regular files, so don't ever attempt to do that on other types of
  files.

- If we hit -EAGAIN on a nonblock marked file, don't arm poll handler for
  it. It should just complete with -EAGAIN.

Cc: stable@vger.kernel.org
Reported-by: Norman Maurer <norman.maurer@googlemail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c