提交 b4e4f669 编写于 作者: T Trond Myklebust

NFSv4.x: Fail client initialisation if state manager thread can't run

If the state manager thread fails to start, then we should just mark the
client initialisation as failed so that other processes or threads don't
get stuck in nfs_wait_client_init_complete().
Reported-by: NChenXiaoSong <chenxiaosong2@huawei.com>
Fixes: 4697bd5e ("NFSv4: Fix a race in the net namespace mount notification")
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 19cdc8fa
...@@ -1230,6 +1230,8 @@ void nfs4_schedule_state_manager(struct nfs_client *clp) ...@@ -1230,6 +1230,8 @@ void nfs4_schedule_state_manager(struct nfs_client *clp)
if (IS_ERR(task)) { if (IS_ERR(task)) {
printk(KERN_ERR "%s: kthread_run: %ld\n", printk(KERN_ERR "%s: kthread_run: %ld\n",
__func__, PTR_ERR(task)); __func__, PTR_ERR(task));
if (!nfs_client_init_is_complete(clp))
nfs_mark_client_ready(clp, PTR_ERR(task));
nfs4_clear_state_manager_bit(clp); nfs4_clear_state_manager_bit(clp);
clear_bit(NFS4CLNT_MANAGER_AVAILABLE, &clp->cl_state); clear_bit(NFS4CLNT_MANAGER_AVAILABLE, &clp->cl_state);
nfs_put_client(clp); nfs_put_client(clp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册