nfsd4: consistent session flag setting
authorJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 15 Apr 2010 19:11:09 +0000 (15:11 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Sat, 17 Apr 2010 01:47:37 +0000 (21:47 -0400)
We should clear these flags on any new create_session, not just on the
first one.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4state.c

index 5d86df1..5051ade 100644 (file)
@@ -1323,12 +1323,6 @@ nfsd4_create_session(struct svc_rqst *rqstp,
                cs_slot->sl_seqid++; /* from 0 to 1 */
                move_to_confirmed(unconf);
 
-               /*
-                * We do not support RDMA or persistent sessions
-                */
-               cr_ses->flags &= ~SESSION4_PERSIST;
-               cr_ses->flags &= ~SESSION4_RDMA;
-
                if (cr_ses->flags & SESSION4_BACK_CHAN) {
                        unconf->cl_cb_xprt = rqstp->rq_xprt;
                        svc_xprt_get(unconf->cl_cb_xprt);
@@ -1348,6 +1342,12 @@ nfsd4_create_session(struct svc_rqst *rqstp,
                goto out;
        }
 
+       /*
+        * We do not support RDMA or persistent sessions
+        */
+       cr_ses->flags &= ~SESSION4_PERSIST;
+       cr_ses->flags &= ~SESSION4_RDMA;
+
        status = alloc_init_session(rqstp, conf, cr_ses);
        if (status)
                goto out;