Finding backchannel failed, nfsd should not enter setup_callback_client. v2. drop ses checking in setup_callback_client and make code more clearer. Signed-off-by: Kinglong Mee <kinglongmee@xxxxxxxxx> --- fs/nfsd/nfs4callback.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 7f05cd1..44d33ce 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -975,11 +975,15 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb) clear_bit(NFSD4_CLIENT_CB_UPDATE, &clp->cl_flags); memcpy(&conn, &cb->cb_clp->cl_cb_conn, sizeof(struct nfs4_cb_conn)); c = __nfsd4_find_backchannel(clp); - if (c) { - svc_xprt_get(c->cn_xprt); - conn.cb_xprt = c->cn_xprt; - ses = c->cn_session; + if (!c) { + spin_unlock(&clp->cl_lock); + nfsd4_mark_cb_down(clp, -ENOTCONN); + return; } + + svc_xprt_get(c->cn_xprt); + conn.cb_xprt = c->cn_xprt; + ses = c->cn_session; spin_unlock(&clp->cl_lock); err = setup_callback_client(clp, &conn, ses); -- 1.8.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html