提交 2f822385 编写于 作者: S Sagi Grimberg 提交者: Zheng Zengkai

nvmet-tcp: fix lockdep complaint on nvmet_tcp_wq flush during queue teardown

stable inclusion
from stable-v5.10.138
commit 534e96302ad2cf24dfa6e6c2b18bc7c50ac16844
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=534e96302ad2cf24dfa6e6c2b18bc7c50ac16844

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

[ Upstream commit 533d2e8b ]

We probably need nvmet_tcp_wq to have MEM_RECLAIM as we are
sending/receiving for the socket from works on this workqueue.
Also this eliminates lockdep complaints:
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 9aaf2a4c
...@@ -1802,7 +1802,8 @@ static int __init nvmet_tcp_init(void) ...@@ -1802,7 +1802,8 @@ static int __init nvmet_tcp_init(void)
{ {
int ret; int ret;
nvmet_tcp_wq = alloc_workqueue("nvmet_tcp_wq", WQ_HIGHPRI, 0); nvmet_tcp_wq = alloc_workqueue("nvmet_tcp_wq",
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
if (!nvmet_tcp_wq) if (!nvmet_tcp_wq)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册