aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:47 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:47 -0500
commit51581f3bf922512880f52a7777923fd6dcfc792b (patch)
tree91e9c6c6a89705e76ec07574d296967c3bde24a9 /fs/nfs
parent3e4f6290ca4df7464ee066123f2bca4298c2dab4 (diff)
NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c21
-rw-r--r--fs/nfs/nfs4state.c1
2 files changed, 20 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 62aed077fc2a..31000326aba4 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2849,8 +2849,7 @@ int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short p
2849 return status; 2849 return status;
2850} 2850}
2851 2851
2852int 2852static int _nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred)
2853nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred)
2854{ 2853{
2855 struct nfs_fsinfo fsinfo; 2854 struct nfs_fsinfo fsinfo;
2856 struct rpc_message msg = { 2855 struct rpc_message msg = {
@@ -2874,6 +2873,24 @@ nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred)
2874 return status; 2873 return status;
2875} 2874}
2876 2875
2876int nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred)
2877{
2878 long timeout;
2879 int err;
2880 do {
2881 err = _nfs4_proc_setclientid_confirm(clp, cred);
2882 switch (err) {
2883 case 0:
2884 return err;
2885 case -NFS4ERR_RESOURCE:
2886 /* The IBM lawyers misread another document! */
2887 case -NFS4ERR_DELAY:
2888 err = nfs4_delay(clp->cl_rpcclient, &timeout);
2889 }
2890 } while (err == 0);
2891 return err;
2892}
2893
2877struct nfs4_delegreturndata { 2894struct nfs4_delegreturndata {
2878 struct nfs4_delegreturnargs args; 2895 struct nfs4_delegreturnargs args;
2879 struct nfs4_delegreturnres res; 2896 struct nfs4_delegreturnres res;
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index afad0255e7db..96e5b82c153b 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -977,6 +977,7 @@ out:
977out_error: 977out_error:
978 printk(KERN_WARNING "Error: state recovery failed on NFSv4 server %u.%u.%u.%u with error %d\n", 978 printk(KERN_WARNING "Error: state recovery failed on NFSv4 server %u.%u.%u.%u with error %d\n",
979 NIPQUAD(clp->cl_addr.s_addr), -status); 979 NIPQUAD(clp->cl_addr.s_addr), -status);
980 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
980 goto out; 981 goto out;
981} 982}
982 983