]> err.no Git - linux-2.6/commitdiff
[PATCH] knfsd: nfsd4: setclientid simplification
authorNeilBrown <neilb@cse.unsw.edu.au>
Fri, 24 Jun 2005 05:03:42 +0000 (22:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 24 Jun 2005 07:06:32 +0000 (00:06 -0700)
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>
fs/nfsd/nfs4state.c

index fb9b4eb4302dd1dc71518c6ca4be65894f976afd..2a59d176e69a8bfdad9c41339ea4bef4111e02d4 100644 (file)
@@ -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;
        }