NFSv41: Cleanup for nfs4_alloc_session.
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 16 Jun 2010 13:52:27 +0000 (09:52 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 22 Jun 2010 17:24:03 +0000 (13:24 -0400)
There is no reason to change the nfs_client state every time we allocate a
new session. Move that line into nfs4_init_client_minor_version.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/client.c
fs/nfs/nfs4proc.c

index 1df708fd42051e877206cc7723942f4dc822490e..4e7df2adb2125724a4ea9ade0fc767606d54c4b3 100644 (file)
@@ -1157,6 +1157,13 @@ static int nfs4_init_client_minor_version(struct nfs_client *clp)
                        return -ENOMEM;
 
                clp->cl_session = session;
+               /*
+                * The create session reply races with the server back
+                * channel probe. Mark the client NFS_CS_SESSION_INITING
+                * so that the client back channel can find the
+                * nfs_client struct
+                */
+               clp->cl_cons_state = NFS_CS_SESSION_INITING;
        }
 #endif /* CONFIG_NFS_V4_1 */
 
index 5d87563d0c1a96d0b33a71c4d44801e3237e2267..b4132fe14282ea5df7e471e1fc0a4ec55b6f866a 100644 (file)
@@ -4795,13 +4795,6 @@ struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp)
        if (!session)
                return NULL;
 
-       /*
-        * The create session reply races with the server back
-        * channel probe. Mark the client NFS_CS_SESSION_INITING
-        * so that the client back channel can find the
-        * nfs_client struct
-        */
-       clp->cl_cons_state = NFS_CS_SESSION_INITING;
        init_completion(&session->complete);
 
        tbl = &session->fc_slot_table;