2005-06-01 22:51:09

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 012 of 28] nfsd4: setclientid simplification


We can be a little more concise here.

Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

### Diffstat output
./fs/nfsd/nfs4state.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)

diff ./fs/nfsd/nfs4state.c~current~ ./fs/nfsd/nfs4state.c
--- ./fs/nfsd/nfs4state.c~current~ 2005-05-31 14:21:00.000000000 +1000
+++ ./fs/nfsd/nfs4state.c 2005-05-31 14:21:01.000000000 +1000
@@ -674,23 +674,13 @@ nfsd4_setclientid(struct svc_rqst *rqstp
* or different ip_address
*/
status = nfserr_clid_inuse;
- if (!cmp_creds(&clp->cl_cred,&rqstp->rq_cred)) {
+ if (!cmp_creds(&clp->cl_cred,&rqstp->rq_cred)
+ || clp->cl_addr != ip_addr) {
printk("NFSD: setclientid: string in use by client"
"(clientid %08x/%08x)\n",
clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
goto out;
}
- if (clp->cl_addr != ip_addr) {
- printk("NFSD: setclientid: string in use by client"
- "(clientid %08x/%08x)\n",
- clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
- goto out;
- }
-
- /*
- * cl_name match from a previous SETCLIENTID operation
- * XXX check for additional matches?
- */
conf = clp;
break;
}


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs