aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-06-24 01:04:09 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:06:34 -0400
commit22de4d837439071a0bec897485d3911383b6ffad (patch)
tree060a06df409be203303f78d8be2adfe913e64249
parent1a69c179a28a9bb9f4d086927b192d5cffe88e50 (diff)
[PATCH] knfsd: nfsd4: fix setclientid_confirm error return
NFS4_INVAL is not a valid error for setclientid_confirm, and INUSE is the more logical error here anyway. 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>
-rw-r--r--fs/nfsd/nfs4state.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 997343c2304..2dc6da74cce 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -849,12 +849,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
849 nfs4_lock_state(); 849 nfs4_lock_state();
850 clp = find_confirmed_client(clid); 850 clp = find_confirmed_client(clid);
851 if (clp) { 851 if (clp) {
852 status = nfserr_inval; 852 status = nfserr_clid_inuse;
853 /*
854 * Found a record for this clientid. If the IP addresses
855 * don't match, return ERR_INVAL just as if the record had
856 * not been found.
857 */
858 if (clp->cl_addr != ip_addr) { 853 if (clp->cl_addr != ip_addr) {
859 printk("NFSD: setclientid: string in use by client" 854 printk("NFSD: setclientid: string in use by client"
860 "(clientid %08x/%08x)\n", 855 "(clientid %08x/%08x)\n",
@@ -865,7 +860,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
865 } 860 }
866 clp = find_unconfirmed_client(clid); 861 clp = find_unconfirmed_client(clid);
867 if (clp) { 862 if (clp) {
868 status = nfserr_inval; 863 status = nfserr_clid_inuse;
869 if (clp->cl_addr != ip_addr) { 864 if (clp->cl_addr != ip_addr) {
870 printk("NFSD: setclientid: string in use by client" 865 printk("NFSD: setclientid: string in use by client"
871 "(clientid %08x/%08x)\n", 866 "(clientid %08x/%08x)\n",
@@ -949,7 +944,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
949 goto out; 944 goto out;
950 } 945 }
951 /* check that we have hit one of the cases...*/ 946 /* check that we have hit one of the cases...*/
952 status = nfserr_inval; 947 status = nfserr_clid_inuse;
953 goto out; 948 goto out;
954out: 949out:
955 if (!status) 950 if (!status)