]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix linked command file table usage
authorJens Axboe <axboe@kernel.dk>
Wed, 29 Jan 2020 20:46:44 +0000 (13:46 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 29 Jan 2020 20:46:44 +0000 (13:46 -0700)
commit96e2202e94d41f9fdf6c62f4dbe419c691090da7
treec6f996fd423f2793fe0aba28e1a0b7b4f98dc3aa
parent5c82360c80c97a7d1a759052e1d5c4535aa8d6df
io_uring: fix linked command file table usage

We're not consistent in how the file table is grabbed and assigned if we
have a command linked that requires the use of it.

Add ->file_table to the io_op_defs[] array, and use that to determine
when to grab the table instead of having the handlers set it if they
need to defer. This also means we can kill the IO_WQ_WORK_NEEDS_FILES
flag. We always initialize work->files, so io-wq can just check for
that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c
fs/io-wq.h
fs/io_uring.c