]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: kill extra checks in io_write()
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 24 Sep 2021 16:14:48 +0000 (17:14 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Sep 2021 16:26:11 +0000 (10:26 -0600)
commit788d003d85e230d28f7f5050d6a1ed50925deff6
tree76602f0f4908a3140641ee9836b9b7faa5c731f7
parentb5abb0cf083fb4ffa558767fd4a49d4c490872a3
io_uring: kill extra checks in io_write()

We don't retry short writes and so we would never get to async setup in
io_write() in that case. Thus ret2 > 0 is always false and
iov_iter_advance() is never used. Apparently, the same is found by
Coverity, which complains on the code.

Fixes: 52e48c0ec3c4 ("io_uring: use iov_iter state save/restore helpers")
Reported-by: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/5b33e61034748ef1022766efc0fb8854cfcf749c.1632500058.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c