Skip to content

Commit

Permalink
[PATCH] knfsd: nfsd4: fix setclientid_confirm error return
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jun 24, 2005
1 parent 1a69c17 commit 22de4d8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 22de4d8

Please sign in to comment.