nfsd4: merge last two setclientid cases
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 19 May 2012 02:00:38 +0000 (22:00 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 1 Jun 2012 00:30:00 +0000 (20:30 -0400)
The code here is mostly the same.

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

index dd4c6d36534b2713661ecfbaf60649d13deeb327..f62ab7624b1f4ef5db7d7b33fabe11d3e23994a0 100644 (file)
@@ -2212,15 +2212,10 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
                if (new == NULL)
                        goto out;
                copy_clid(new, conf);
-       } else if (!unconf) {
-               /* case 2: probable client reboot: */
-               new = create_client(clname, dname, rqstp, &clverifier);
-               if (new == NULL)
-                       goto out;
-               gen_clid(new);
-       } else {
-               /* case 3: probable client reboot: */
-               expire_client(unconf);
+       } else { /* conf && !same_verf(): */
+               /* cases 2, 3: probable client reboot: */
+               if (unconf)
+                       expire_client(unconf);
                new = create_client(clname, dname, rqstp, &clverifier);
                if (new == NULL)
                        goto out;