Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217288
b: refs/heads/master
c: 86c3e16
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Oct 21, 2010
1 parent 2872796 commit c9f5713
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac7c46f29a44f6d7f6d2e36dc874c0b7056acad2
refs/heads/master: 86c3e16cc7aace4d1143952813b6cc2a80c51295
8 changes: 5 additions & 3 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ nfsd4_create_session(struct svc_rqst *rqstp,
struct nfs4_client *conf, *unconf;
struct nfsd4_session *new;
struct nfsd4_clid_slot *cs_slot = NULL;
bool confirm_me = false;
int status = 0;

nfs4_lock_state();
Expand All @@ -1509,7 +1510,6 @@ nfsd4_create_session(struct svc_rqst *rqstp,
cs_slot->sl_seqid, cr_ses->seqid);
goto out;
}
cs_slot->sl_seqid++;
} else if (unconf) {
if (!same_creds(&unconf->cl_cred, &rqstp->rq_cred) ||
!rpc_cmp_addr(sa, (struct sockaddr *) &unconf->cl_addr)) {
Expand All @@ -1525,8 +1525,7 @@ nfsd4_create_session(struct svc_rqst *rqstp,
goto out;
}

cs_slot->sl_seqid++; /* from 0 to 1 */
move_to_confirmed(unconf);
confirm_me = true;
conf = unconf;
} else {
status = nfserr_stale_clientid;
Expand All @@ -1546,10 +1545,13 @@ nfsd4_create_session(struct svc_rqst *rqstp,
status = nfs_ok;
memcpy(cr_ses->sessionid.data, new->se_sessionid.data,
NFS4_MAX_SESSIONID_LEN);
cs_slot->sl_seqid++;
cr_ses->seqid = cs_slot->sl_seqid;

/* cache solo and embedded create sessions under the state lock */
nfsd4_cache_create_session(cr_ses, cs_slot, status);
if (confirm_me)
move_to_confirmed(conf);
out:
nfs4_unlock_state();
dprintk("%s returns %d\n", __func__, ntohl(status));
Expand Down

0 comments on commit c9f5713

Please sign in to comment.