]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: don't use poll handler if file can't be nonblocking read/written
authorJens Axboe <axboe@kernel.dk>
Tue, 25 Aug 2020 18:27:50 +0000 (12:27 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Aug 2020 18:27:50 +0000 (12:27 -0600)
commit2005cc896c919aa2b2246f7cff2e4c5758e9c863
treeee5aaa05cb9cbcd504f81dcb77cbb46675f00d0d
parent1c65eee8a6debc03df43c77a5e22734af2f4a8ea
io_uring: don't use poll handler if file can't be nonblocking read/written

There's no point in using the poll handler if we can't do a nonblocking
IO attempt of the operation, since we'll need to go async anyway. In
fact this is actively harmful, as reading from eg pipes won't return 0
to indicate EOF.

Cc: stable@vger.kernel.org # v5.7+
Reported-by: Benedikt Ames <wisp3rwind@posteo.eu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c