Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309861
b: refs/heads/master
c: 90d700b
h: refs/heads/master
i:
  309859: 4d3f594
v: v3
  • Loading branch information
J. Bruce Fields committed Jun 1, 2012
1 parent 2ea8690 commit b90bcaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 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: f3d03b9202e4303f0e687f93ffeab87724f6dcfb
refs/heads/master: 90d700b7792a1a7d57554620796df46246e26ce6
24 changes: 11 additions & 13 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2245,30 +2245,28 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
if (conf && !same_creds(&conf->cl_cred, &rqstp->rq_cred))
goto out;
/* cases below refer to rfc 3530 section 14.2.34: */
if (conf && unconf && same_verf(&confirm, &unconf->cl_confirm)) {
/* case 1: callback update */
if (!unconf || !same_verf(&confirm, &unconf->cl_confirm)) {
if (conf && !unconf) /* case 2: probable retransmit */
status = nfs_ok;
else /* case 4: client hasn't noticed we rebooted yet? */
status = nfserr_stale_clientid;
goto out;
}
status = nfs_ok;
if (conf) { /* case 1: callback update */
nfsd4_change_callback(conf, &unconf->cl_cb_conn);
nfsd4_probe_callback(conf);
expire_client(unconf);
status = nfs_ok;
} else if (conf && !unconf) {
status = nfs_ok;
} else if (!conf && unconf
&& same_verf(&unconf->cl_confirm, &confirm)) {
/* case 3: normal case; new or rebooted client */
} else { /* case 3: normal case; new or rebooted client */
unsigned int hash = clientstr_hashval(unconf->cl_recdir);

conf = find_confirmed_client_by_str(unconf->cl_recdir, hash);
if (conf) {
nfsd4_client_record_remove(conf);
expire_client(conf);
}
move_to_confirmed(unconf);
nfsd4_probe_callback(unconf);
status = nfs_ok;
} else if ((!conf || !same_verf(&conf->cl_confirm, &confirm))
&& (!unconf || !same_verf(&unconf->cl_confirm, &confirm))) {
/* case 4: client hasn't noticed we rebooted yet? */
status = nfserr_stale_clientid;
}
out:
nfs4_unlock_state();
Expand Down

0 comments on commit b90bcaf

Please sign in to comment.