In nfsd4_run_cb_work if the rpc_clnt for the back channel is no longer exists, the callback state in nfs4_client should be marked as NFSD4_CB_DOWN so the server can notify the client to establish a new back channel connection when it reconnects. Signed-off-by: Dai Ngo <dai.ngo@xxxxxxxxxx> --- fs/nfsd/nfs4callback.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index cf87ace7a1b0..f8bb5ff2e9ac 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -1491,9 +1491,14 @@ nfsd4_run_cb_work(struct work_struct *work) clnt = clp->cl_cb_client; if (!clnt) { - if (test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags)) + if (test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags)) { nfsd41_destroy_cb(cb); - else { + clear_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags); + + /* let client knows BC is down when it reconnects */ + clear_bit(NFSD4_CLIENT_CB_UPDATE, &clp->cl_flags); + nfsd4_mark_cb_down(clp); + } else { /* * XXX: Ideally, we could wait for the client to * reconnect, but I haven't figured out how -- 2.39.3