summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-05-18 22:23:42 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-05-31 20:30:02 -0400
commit34b232bb3742dc88eef7352da2ca018f51ac4561 (patch)
tree469c41eb6e86d9205560c154cdfe3b8a03d33a79 /fs/nfsd
parent8f9307119d7fb2f2c04fce27aa492d30e7ac4518 (diff)
downloadlinux-34b232bb3742dc88eef7352da2ca018f51ac4561.tar.gz
nfsd4: merge 3 setclientid cases to 2
Boy, is this simpler. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 1fe06ebf192f..9d7e3eb0f5db 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -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: