]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
nfsd4: merge 3 setclientid cases to 2
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 19 May 2012 02:23:42 +0000 (22:23 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 1 Jun 2012 00:30:02 +0000 (20:30 -0400)
Boy, is this simpler.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 1fe06ebf192f1634c5380accad6c4af530653cee..9d7e3eb0f5db92af67efd5aa867054eb1db6fcd8 100644 (file)
@@ -2195,16 +2195,11 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
        new = create_client(clname, dname, rqstp, &clverifier);
        if (new == NULL)
                goto out;
-       if (!conf) {
-               /* case 4: placed first, because it's the normal case */
-               gen_clid(new);
-       } else if (same_verf(&conf->cl_verifier, &clverifier)) {
+       if (conf && same_verf(&conf->cl_verifier, &clverifier))
                /* case 1: probable callback update */
                copy_clid(new, conf);
-       } else { /* conf && !same_verf(): */
-               /* cases 2, 3: probable client reboot: */
+       else /* case 4 (new client) or cases 2, 3 (client reboot): */
                gen_clid(new);
-       }
        /*
         * XXX: we should probably set this at creation time, and check
         * for consistent minorversion use throughout: