]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
nfsd4: CREATE_SESSION should update backchannel immediately
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 18 Jul 2014 19:06:47 +0000 (15:06 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 21 Jul 2014 16:30:50 +0000 (12:30 -0400)
nfsd4_probe_callback kicks off some work that will eventually run
nfsd4_process_cb_update and update the session flags.  In theory we
could process a following SEQUENCE call before that update happens
resulting in flags that don't accurately represent, for example, the
lack of a backchannel.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index fd4deb049ddf09809be6fb2761605ab2bbca4bea..10cdb67762f6b80c3ebeda59f4d167983d9ca97c 100644 (file)
@@ -1223,10 +1223,8 @@ static void nfsd4_init_conn(struct svc_rqst *rqstp, struct nfsd4_conn *conn, str
        if (ret)
                /* oops; xprt is already down: */
                nfsd4_conn_lost(&conn->cn_xpt_user);
-       if (conn->cn_flags & NFS4_CDFC4_BACK) {
-               /* callback channel may be back up */
-               nfsd4_probe_callback(ses->se_client);
-       }
+       /* We may have gained or lost a callback channel: */
+       nfsd4_probe_callback_sync(ses->se_client);
 }
 
 static struct nfsd4_conn *alloc_conn_from_crses(struct svc_rqst *rqstp, struct nfsd4_create_session *cses)