Commit 62ca1710 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Zheng Zengkai
Browse files

io_uring: deduplicate failing task_work_add

mainline inclusion
from mainline-5.12-rc1
commit eab30c4d
category: bugfix
bugzilla: 182869 https://gitee.com/openeuler/kernel/issues/I4DDEL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eab30c4d20dc761d463445e5130421863ff81505



---------------------------

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: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>

Conflicts:
	fs/io_uring.c
	[ 355fb9e2("io_uring: remove 'twa_signal_ok' deadlock
	  work-around") is not applied. ]

Signed-off-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 98d3ad1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment