]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: don't call work.func from sync ctx
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 24 Feb 2020 08:30:16 +0000 (11:30 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 2 Mar 2020 21:04:24 +0000 (14:04 -0700)
commit8bae2a72a1ba956d9ba369b979397fa9ac810793
treee5186a98a5ae86de4b79d59e13f366e3e0f48462
parentae6f87702fdc7f1a0f6fa11f4a151e29ee82e188
io_uring: don't call work.func from sync ctx

Many operations define custom work.func before getting into an io-wq.
There are several points against:
- it calls io_wq_assign_next() from outside io-wq, that may be confusing
- sync context would go unnecessary through io_req_cancelled()
- prototypes are quite different, so work!=old_work looks strange
- makes async/sync responsibilities fuzzy
- adds extra overhead

Don't call generic path and io-wq handlers from each other, but use
helpers instead

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