提交 7abea1e8 编写于 作者: J Jeff Layton 提交者: J. Bruce Fields

nfsd: don't destroy client if mark_client_expired_locked fails

If it fails, it means that the client is in use and so destroying it
would be bad. Currently, the client_mutex prevents this from happening
but once we remove it, we won't be able to do this.
Signed-off-by: NJeff Layton <jlayton@primarydata.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 97403d95
......@@ -2496,8 +2496,10 @@ nfsd4_create_session(struct svc_rqst *rqstp,
old = find_confirmed_client_by_name(&unconf->cl_name, nn);
if (old) {
status = mark_client_expired_locked(old);
if (status)
if (status) {
old = NULL;
goto out_free_conn;
}
}
move_to_confirmed(unconf);
conf = unconf;
......@@ -3041,8 +3043,10 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
old = find_confirmed_client_by_name(&unconf->cl_name, nn);
if (old) {
status = mark_client_expired_locked(old);
if (status)
if (status) {
old = NULL;
goto out;
}
}
move_to_confirmed(unconf);
conf = unconf;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册