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, 1 Feb 2021 17:02:42 +0000 (10:02 -0700)
commiteab30c4d20dc761d463445e5130421863ff81505
treed22c11edb7f9a701d465de59f78f0039cb68fff0
parent02b23a9af5ba4db0a85ebb81c8b376b2fe860d0f
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