]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit32ad7a7a2e9c1fc34c2267b77ee0ac9dadc8b99e
tree0be1a797a2fe040abdcd2afdee057ea38f39ea08
parent5bbfb13d7ef4a19bf50562062aaba0fbc71da105
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