]> 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)
commit5cb8cbe7a9da931a471948b191a28a665c9dc2c8
treec6f996fd423f2793fe0aba28e1a0b7b4f98dc3aa
parentb4c093ebd7a52e5449460bf45ea0edbdbd5daa84
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