Commit 51581f3bf922512880f52a7777923fd6dcfc792b
1 parent
3e4f6290ca
Exists in
master
and in
7 other branches
NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Showing 2 changed files with 20 additions and 2 deletions Side-by-side Diff
fs/nfs/nfs4proc.c
... | ... | @@ -2849,8 +2849,7 @@ |
2849 | 2849 | return status; |
2850 | 2850 | } |
2851 | 2851 | |
2852 | -int | |
2853 | -nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred) | |
2852 | +static int _nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred) | |
2854 | 2853 | { |
2855 | 2854 | struct nfs_fsinfo fsinfo; |
2856 | 2855 | struct rpc_message msg = { |
... | ... | @@ -2872,6 +2871,24 @@ |
2872 | 2871 | spin_unlock(&clp->cl_lock); |
2873 | 2872 | } |
2874 | 2873 | return status; |
2874 | +} | |
2875 | + | |
2876 | +int 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; | |
2875 | 2892 | } |
2876 | 2893 | |
2877 | 2894 | struct nfs4_delegreturndata { |
fs/nfs/nfs4state.c