nfsd: Drop duplicate checking of seqid in nfsd4_create_session()
authorKinglong Mee <kinglongmee@gmail.com>
Mon, 13 Jul 2015 09:32:34 +0000 (17:32 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 10 Aug 2015 20:05:49 +0000 (16:05 -0400)
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 14c49e5..30dbc9c 100644 (file)
@@ -2555,11 +2555,9 @@ nfsd4_create_session(struct svc_rqst *rqstp,
                        goto out_free_conn;
                cs_slot = &conf->cl_cs_slot;
                status = check_slot_seqid(cr_ses->seqid, cs_slot->sl_seqid, 0);
-               if (status == nfserr_replay_cache) {
-                       status = nfsd4_replay_create_session(cr_ses, cs_slot);
-                       goto out_free_conn;
-               } else if (cr_ses->seqid != cs_slot->sl_seqid + 1) {
-                       status = nfserr_seq_misordered;
+               if (status) {
+                       if (status == nfserr_replay_cache)
+                               status = nfsd4_replay_create_session(cr_ses, cs_slot);
                        goto out_free_conn;
                }
        } else if (unconf) {