]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: allow non-fixed files with SQPOLL
authorJens Axboe <axboe@kernel.dk>
Mon, 14 Sep 2020 16:51:17 +0000 (10:51 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Dec 2020 19:03:54 +0000 (12:03 -0700)
commite8e8cb1272ddeb60029ef6054c5f178e8da547f2
tree420d5d7ded4a818f0ed57acf67f0612aee9ef29d
parent0b76124382923bd2c0c39d6d79093b6fc5b37368
io_uring: allow non-fixed files with SQPOLL

The restriction of needing fixed files for SQPOLL is problematic, and
prevents/inhibits several valid uses cases. With the referenced
files_struct that we have now, it's trivially supportable.

Treat ->files like we do the mm for the SQPOLL thread - grab a reference
to it (and assign it), and drop it when we're done.

This feature is exposed as IORING_FEAT_SQPOLL_NONFIXED.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
include/uapi/linux/io_uring.h