io_uring: deduplicate failing task_work_add
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 19 Jan 2021 13:32:42 +0000 (13:32 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 15:18:37 +0000 (08:18 -0700)
commit7cb73891af953cb5e5eba50f66ea7fd3d26770d1
tree4aeb9c477f12ca9e7c0b126e9e8ec6e29b7d346f
parent2f26b88a1e3f647bcc15d4a7ffb154e661bd0886
io_uring: deduplicate failing task_work_add

When io_req_task_work_add() fails, the request will be cancelled by
enqueueing via task_works of io-wq. Extract a function for that.

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