summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-06-23 22:04:09 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 00:06:34 -0700
commit22de4d837439071a0bec897485d3911383b6ffad (patch)
tree060a06df409be203303f78d8be2adfe913e64249 /fs/nfsd
parent1a69c179a28a9bb9f4d086927b192d5cffe88e50 (diff)
downloadop-kernel-dev-22de4d837439071a0bec897485d3911383b6ffad.zip
op-kernel-dev-22de4d837439071a0bec897485d3911383b6ffad.tar.gz
[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>
Diffstat (limited to 'fs/nfsd')
-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 997343c..2dc6da74 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
nfs4_lock_state();
clp = find_confirmed_client(clid);
if (clp) {
- status = nfserr_inval;
- /*
- * Found a record for this clientid. If the IP addresses
- * don't match, return ERR_INVAL just as if the record had
- * not been found.
- */
+ status = nfserr_clid_inuse;
if (clp->cl_addr != ip_addr) {
printk("NFSD: setclientid: string in use by client"
"(clientid %08x/%08x)\n",
@@ -865,7 +860,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
}
clp = find_unconfirmed_client(clid);
if (clp) {
- status = nfserr_inval;
+ status = nfserr_clid_inuse;
if (clp->cl_addr != ip_addr) {
printk("NFSD: setclientid: string in use by client"
"(clientid %08x/%08x)\n",
@@ -949,7 +944,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
goto out;
}
/* check that we have hit one of the cases...*/
- status = nfserr_inval;
+ status = nfserr_clid_inuse;
goto out;
out:
if (!status)
OpenPOWER on IntegriCloud