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)
commit57cd657b8272a66277c139e7bbdc8b86057cb415
treea26e3482cf57f147c8d680beb5777392cfbb2f28
parentce3d5aae331fa0eb1e88199e0380f517ed0c58f6
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