Skip to content

Commit

Permalink
[PATCH] knfsd: nfsd4: setclientid simplification
Browse files Browse the repository at this point in the history
We can be a little more concise here.

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>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jun 24, 2005
1 parent bd0b1e9 commit 7dea9d2
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,23 +674,13 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid)
* 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;
}
Expand Down

0 comments on commit 7dea9d2

Please sign in to comment.