io_uring: don't open-code recv kbuf managment
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 16 Jul 2020 20:28:05 +0000 (23:28 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jul 2020 19:00:45 +0000 (13:00 -0600)
commit7fbb1b541f4286cc337b9bca1e5bad0ce4ee978c
tree15c4e1399e78d6b9cafd4ba8205cd2d9fe4f579a
parent8ff069bf2efd7b7aeb90b56ea8edc165c93d8940
io_uring: don't open-code recv kbuf managment

Don't implement fast path of kbuf freeing and management inlined into
io_recv{,msg}(), that's error prone and duplicates handling. Replace it
with a helper io_put_recv_kbuf(), which mimics io_put_rw_kbuf() in the
io_read/write().

This also keeps cflags calculation in one place, removing duplication
between rw and recv/send.

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