diff options
-rw-r--r-- | fs/nfs/nfs4state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index c8e729deb4f7..6f0470667f95 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -2093,10 +2093,15 @@ again: | |||
2093 | nfs4_root_machine_cred(clp); | 2093 | nfs4_root_machine_cred(clp); |
2094 | goto again; | 2094 | goto again; |
2095 | } | 2095 | } |
2096 | if (i > 2) | 2096 | if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX) |
2097 | break; | 2097 | break; |
2098 | case -NFS4ERR_CLID_INUSE: | 2098 | case -NFS4ERR_CLID_INUSE: |
2099 | case -NFS4ERR_WRONGSEC: | 2099 | case -NFS4ERR_WRONGSEC: |
2100 | /* No point in retrying if we already used RPC_AUTH_UNIX */ | ||
2101 | if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX) { | ||
2102 | status = -EPERM; | ||
2103 | break; | ||
2104 | } | ||
2100 | clnt = rpc_clone_client_set_auth(clnt, RPC_AUTH_UNIX); | 2105 | clnt = rpc_clone_client_set_auth(clnt, RPC_AUTH_UNIX); |
2101 | if (IS_ERR(clnt)) { | 2106 | if (IS_ERR(clnt)) { |
2102 | status = PTR_ERR(clnt); | 2107 | status = PTR_ERR(clnt); |