Commit 7dea9d28 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] knfsd: nfsd4: setclientid simplification

We can be a little more concise here.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bd0b1e95
...@@ -674,23 +674,13 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid) ...@@ -674,23 +674,13 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid)
* or different ip_address * or different ip_address
*/ */
status = nfserr_clid_inuse; 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" printk("NFSD: setclientid: string in use by client"
"(clientid %08x/%08x)\n", "(clientid %08x/%08x)\n",
clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id); clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
goto out; 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; conf = clp;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment