nfsd: Drop duplicate checking of seqid in nfsd4_create_session()

This change “nfsd: Drop duplicate checking of seqid in nfsd4_create_session()” in Linux kernel is authored by Kinglong Mee <kinglongmee [at] gmail.com> on Mon Jul 13 17:32:34 2015 +0800.

nfsd: Drop duplicate checking of seqid in nfsd4_create_session()

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit f5e22bb.

There are 8 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/nfsd/nfs4state.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 14c49e5..30dbc9c 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2555,11 +2555,9 @@ static __be32 nfsd4_check_cb_sec(struct nfsd4_cb_sec *cbs)
 			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) {

The commit for this change in Linux stable tree is f5e22bb (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *