[PATCH] knfsd: nfsd4: setclientid_confirm comments
Trivial whitespace and comment fixes. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
08e8987c37
commit
7c79f7377c
1 changed files with 29 additions and 30 deletions
|
@ -869,16 +869,16 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
|
||||||
}
|
}
|
||||||
unconf = clp;
|
unconf = clp;
|
||||||
}
|
}
|
||||||
/* CASE 1:
|
|
||||||
* unconf record that matches input clientid and input confirm.
|
|
||||||
* conf record that matches input clientid.
|
|
||||||
* conf and unconf records match names, verifiers
|
|
||||||
*/
|
|
||||||
if ((conf && unconf) &&
|
if ((conf && unconf) &&
|
||||||
(cmp_verf(&unconf->cl_confirm, &confirm)) &&
|
(cmp_verf(&unconf->cl_confirm, &confirm)) &&
|
||||||
(cmp_verf(&conf->cl_verifier, &unconf->cl_verifier)) &&
|
(cmp_verf(&conf->cl_verifier, &unconf->cl_verifier)) &&
|
||||||
(same_name(conf->cl_recdir,unconf->cl_recdir)) &&
|
(same_name(conf->cl_recdir,unconf->cl_recdir)) &&
|
||||||
(!cmp_verf(&conf->cl_confirm, &unconf->cl_confirm))) {
|
(!cmp_verf(&conf->cl_confirm, &unconf->cl_confirm))) {
|
||||||
|
/* CASE 1:
|
||||||
|
* unconf record that matches input clientid and input confirm.
|
||||||
|
* conf record that matches input clientid.
|
||||||
|
* conf and unconf records match names, verifiers
|
||||||
|
*/
|
||||||
if (!cmp_creds(&conf->cl_cred, &unconf->cl_cred))
|
if (!cmp_creds(&conf->cl_cred, &unconf->cl_cred))
|
||||||
status = nfserr_clid_inuse;
|
status = nfserr_clid_inuse;
|
||||||
else {
|
else {
|
||||||
|
@ -891,29 +891,29 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
|
||||||
status = nfs_ok;
|
status = nfs_ok;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
} else if ((conf && !unconf) ||
|
||||||
/* 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.
|
|
||||||
*/
|
|
||||||
else if ((conf && !unconf) ||
|
|
||||||
((conf && unconf) &&
|
((conf && unconf) &&
|
||||||
(!cmp_verf(&conf->cl_verifier, &unconf->cl_verifier) ||
|
(!cmp_verf(&conf->cl_verifier, &unconf->cl_verifier) ||
|
||||||
!same_name(conf->cl_recdir, unconf->cl_recdir)))) {
|
!same_name(conf->cl_recdir, unconf->cl_recdir)))) {
|
||||||
|
/* CASE 2:
|
||||||
|
* conf record that matches input clientid.
|
||||||
|
* if unconf record matches input clientid, then
|
||||||
|
* unconf->cl_name or unconf->cl_verifier don't match the
|
||||||
|
* conf record.
|
||||||
|
*/
|
||||||
if (!cmp_creds(&conf->cl_cred,&rqstp->rq_cred)) {
|
if (!cmp_creds(&conf->cl_cred,&rqstp->rq_cred)) {
|
||||||
status = nfserr_clid_inuse;
|
status = nfserr_clid_inuse;
|
||||||
} else {
|
} else {
|
||||||
clp = conf;
|
clp = conf;
|
||||||
status = nfs_ok;
|
status = nfs_ok;
|
||||||
}
|
}
|
||||||
}
|
} else if (!conf && unconf
|
||||||
/* CASE 3:
|
&& cmp_verf(&unconf->cl_confirm, &confirm)) {
|
||||||
* conf record not found.
|
/* CASE 3:
|
||||||
* unconf record found.
|
* conf record not found.
|
||||||
* unconf->cl_confirm matches input confirm
|
* unconf record found.
|
||||||
*/
|
* unconf->cl_confirm matches input confirm
|
||||||
else if (!conf && unconf && cmp_verf(&unconf->cl_confirm, &confirm)) {
|
*/
|
||||||
if (!cmp_creds(&unconf->cl_cred, &rqstp->rq_cred)) {
|
if (!cmp_creds(&unconf->cl_cred, &rqstp->rq_cred)) {
|
||||||
status = nfserr_clid_inuse;
|
status = nfserr_clid_inuse;
|
||||||
} else {
|
} else {
|
||||||
|
@ -928,18 +928,17 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
|
||||||
move_to_confirmed(unconf);
|
move_to_confirmed(unconf);
|
||||||
status = nfs_ok;
|
status = nfs_ok;
|
||||||
}
|
}
|
||||||
}
|
} else if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm)))
|
||||||
/* CASE 4:
|
&& (!unconf || (unconf && !cmp_verf(&unconf->cl_confirm,
|
||||||
* conf record not found, or if conf, then conf->cl_confirm does not
|
&confirm)))) {
|
||||||
* match input confirm.
|
/* CASE 4:
|
||||||
* unconf record not found, or if unconf, then unconf->cl_confirm
|
* conf record not found, or if conf, conf->cl_confirm does not
|
||||||
* does not match input confirm.
|
* match input confirm.
|
||||||
*/
|
* unconf record not found, or if unconf, unconf->cl_confirm
|
||||||
else if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm))) &&
|
* does not match input confirm.
|
||||||
(!unconf || (unconf && !cmp_verf(&unconf->cl_confirm, &confirm)))) {
|
*/
|
||||||
status = nfserr_stale_clientid;
|
status = nfserr_stale_clientid;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* check that we have hit one of the cases...*/
|
/* check that we have hit one of the cases...*/
|
||||||
status = nfserr_clid_inuse;
|
status = nfserr_clid_inuse;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue