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)
commit8371adf53c3c5ebfde1172608d3f4e126729cb10
tree2432657ad83ec5d4e84f928ddc2a633b9094f355
parent479f517be57185087c2ae3c5e5aea0c3c6d4e5cc
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