io_uring: allow retry for O_NONBLOCK if async is supported
authorJens Axboe <axboe@kernel.dk>
Tue, 14 Sep 2021 17:08:37 +0000 (11:08 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 14 Sep 2021 17:09:42 +0000 (11:09 -0600)
commit5d329e1286b0a040264e239b80257c937f6e685f
tree0be1a797a2fe040abdcd2afdee057ea38f39ea08
parent9c7b0ba887513b6681e7883d306df0a0fd580afa
io_uring: allow retry for O_NONBLOCK if async is supported

A common complaint is that using O_NONBLOCK files with io_uring can be a
bit of a pain. Be a bit nicer and allow normal retry IFF the file does
support async behavior. This makes it possible to use io_uring more
reliably with O_NONBLOCK files, for use cases where it either isn't
possible or feasible to modify the file flags.

Cc: stable@vger.kernel.org
Reported-and-tested-by: Dan Melnic <dmm@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c