From: NeilBrown Date: Fri, 24 Jun 2005 05:03:42 +0000 (-0700) Subject: [PATCH] knfsd: nfsd4: setclientid simplification X-Git-Tag: v2.6.13-rc1~68^2~298 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dea9d280c96f90382ec5d5709433e66a0993ec9;p=linux-2.6 [PATCH] knfsd: nfsd4: setclientid simplification We can be a little more concise here. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index fb9b4eb430..2a59d176e6 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -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; }