Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3120
b: refs/heads/master
c: 08e8987
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jun 24, 2005
1 parent dd49f4c commit 1394fc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 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: 22de4d837439071a0bec897485d3911383b6ffad
refs/heads/master: 08e8987c37cd04d2df211c1e019d8f165d44266e
17 changes: 7 additions & 10 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,14 +891,13 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
status = nfs_ok;

}
goto out;
}
/* CASE 2:
* conf record that matches input clientid.
* if unconf record that matches input clientid, then unconf->cl_name
* or unconf->cl_verifier don't match the conf record.
*/
if ((conf && !unconf) ||
else if ((conf && !unconf) ||
((conf && unconf) &&
(!cmp_verf(&conf->cl_verifier, &unconf->cl_verifier) ||
!same_name(conf->cl_recdir, unconf->cl_recdir)))) {
Expand All @@ -908,14 +907,13 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
clp = conf;
status = nfs_ok;
}
goto out;
}
/* CASE 3:
* conf record not found.
* unconf record found.
* unconf->cl_confirm matches input confirm
*/
if (!conf && unconf && cmp_verf(&unconf->cl_confirm, &confirm)) {
else if (!conf && unconf && cmp_verf(&unconf->cl_confirm, &confirm)) {
if (!cmp_creds(&unconf->cl_cred, &rqstp->rq_cred)) {
status = nfserr_clid_inuse;
} else {
Expand All @@ -930,22 +928,21 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
move_to_confirmed(unconf);
status = nfs_ok;
}
goto out;
}
/* CASE 4:
* conf record not found, or if conf, then conf->cl_confirm does not
* match input confirm.
* unconf record not found, or if unconf, then unconf->cl_confirm
* does not match input confirm.
*/
if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm))) &&
else if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm))) &&
(!unconf || (unconf && !cmp_verf(&unconf->cl_confirm, &confirm)))) {
status = nfserr_stale_clientid;
goto out;
}
/* check that we have hit one of the cases...*/
status = nfserr_clid_inuse;
goto out;
else {
/* check that we have hit one of the cases...*/
status = nfserr_clid_inuse;
}
out:
if (!status)
nfsd4_probe_callback(clp);
Expand Down

0 comments on commit 1394fc9

Please sign in to comment.