diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-06-24 01:04:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:06:34 -0400 |
commit | 08e8987c37cd04d2df211c1e019d8f165d44266e (patch) | |
tree | 5cce86377d0bcae663940acd2600d45b8dc4153d /fs/nfsd | |
parent | 22de4d837439071a0bec897485d3911383b6ffad (diff) |
[PATCH] knfsd: nfsd4: setclientid_confirm gotoectomy
Change from "goto" to "else if" format in setclientid_confirm.
From: Fred Isaman
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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2dc6da74ccea..9014dc2a632a 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -891,14 +891,13 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi | |||
891 | status = nfs_ok; | 891 | status = nfs_ok; |
892 | 892 | ||
893 | } | 893 | } |
894 | goto out; | ||
895 | } | 894 | } |
896 | /* CASE 2: | 895 | /* CASE 2: |
897 | * conf record that matches input clientid. | 896 | * conf record that matches input clientid. |
898 | * if unconf record that matches input clientid, then unconf->cl_name | 897 | * if unconf record that matches input clientid, then unconf->cl_name |
899 | * or unconf->cl_verifier don't match the conf record. | 898 | * or unconf->cl_verifier don't match the conf record. |
900 | */ | 899 | */ |
901 | if ((conf && !unconf) || | 900 | else if ((conf && !unconf) || |
902 | ((conf && unconf) && | 901 | ((conf && unconf) && |
903 | (!cmp_verf(&conf->cl_verifier, &unconf->cl_verifier) || | 902 | (!cmp_verf(&conf->cl_verifier, &unconf->cl_verifier) || |
904 | !same_name(conf->cl_recdir, unconf->cl_recdir)))) { | 903 | !same_name(conf->cl_recdir, unconf->cl_recdir)))) { |
@@ -908,14 +907,13 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi | |||
908 | clp = conf; | 907 | clp = conf; |
909 | status = nfs_ok; | 908 | status = nfs_ok; |
910 | } | 909 | } |
911 | goto out; | ||
912 | } | 910 | } |
913 | /* CASE 3: | 911 | /* CASE 3: |
914 | * conf record not found. | 912 | * conf record not found. |
915 | * unconf record found. | 913 | * unconf record found. |
916 | * unconf->cl_confirm matches input confirm | 914 | * unconf->cl_confirm matches input confirm |
917 | */ | 915 | */ |
918 | if (!conf && unconf && cmp_verf(&unconf->cl_confirm, &confirm)) { | 916 | else if (!conf && unconf && cmp_verf(&unconf->cl_confirm, &confirm)) { |
919 | if (!cmp_creds(&unconf->cl_cred, &rqstp->rq_cred)) { | 917 | if (!cmp_creds(&unconf->cl_cred, &rqstp->rq_cred)) { |
920 | status = nfserr_clid_inuse; | 918 | status = nfserr_clid_inuse; |
921 | } else { | 919 | } else { |
@@ -930,7 +928,6 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi | |||
930 | move_to_confirmed(unconf); | 928 | move_to_confirmed(unconf); |
931 | status = nfs_ok; | 929 | status = nfs_ok; |
932 | } | 930 | } |
933 | goto out; | ||
934 | } | 931 | } |
935 | /* CASE 4: | 932 | /* CASE 4: |
936 | * conf record not found, or if conf, then conf->cl_confirm does not | 933 | * conf record not found, or if conf, then conf->cl_confirm does not |
@@ -938,14 +935,14 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi | |||
938 | * unconf record not found, or if unconf, then unconf->cl_confirm | 935 | * unconf record not found, or if unconf, then unconf->cl_confirm |
939 | * does not match input confirm. | 936 | * does not match input confirm. |
940 | */ | 937 | */ |
941 | if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm))) && | 938 | else if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm))) && |
942 | (!unconf || (unconf && !cmp_verf(&unconf->cl_confirm, &confirm)))) { | 939 | (!unconf || (unconf && !cmp_verf(&unconf->cl_confirm, &confirm)))) { |
943 | status = nfserr_stale_clientid; | 940 | status = nfserr_stale_clientid; |
944 | goto out; | ||
945 | } | 941 | } |
946 | /* check that we have hit one of the cases...*/ | 942 | else { |
947 | status = nfserr_clid_inuse; | 943 | /* check that we have hit one of the cases...*/ |
948 | goto out; | 944 | status = nfserr_clid_inuse; |
945 | } | ||
949 | out: | 946 | out: |
950 | if (!status) | 947 | if (!status) |
951 | nfsd4_probe_callback(clp); | 948 | nfsd4_probe_callback(clp); |