]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: simplify do_read return parsing
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 1 Feb 2021 18:59:56 +0000 (18:59 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Feb 2021 20:09:21 +0000 (13:09 -0700)
commitd5aa45fc08f3edb2d34978533623b2d0118329b2
treea26e3482cf57f147c8d680beb5777392cfbb2f28
parent5e037610121934c63871f2dd76d69b869c62adab
io_uring: simplify do_read return parsing

do_read() returning 0 bytes read (not -EAGAIN/etc.) is not an important
enough of a case to prioritise it. Fold it into ret < 0 check, so we get
rid of an extra if and make it a bit more readable.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c