• Pavel Begunkov's avatar
    io_uring: don't call work.func from sync ctx · 5ea62161
    Pavel Begunkov authored
    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: default avatarPavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    5ea62161
io_uring.c 169 KB