]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: simplify io_file_get()
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 10 Oct 2020 17:34:08 +0000 (18:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 10 Oct 2020 18:49:24 +0000 (12:49 -0600)
commitbd99d649a0ae2c75699500bb84e4012d0a922bbc
tree2432657ad83ec5d4e84f928ddc2a633b9094f355
parent7fe6dcb753651e564ab4a6a1cc950d13a79fd644
io_uring: simplify io_file_get()

Keep ->needs_file_no_error check out of io_file_get(), and let callers
handle it. It makes it more straightforward. Also, as the only error it
can hand back -EBADF, make it return a file or NULL.

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