Commit 03391693 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.1: Don't call nfs4_schedule_state_recovery() unnecessarily

Currently, nfs4_handle_exception() will call it twice if called with an
error of -NFS4ERR_STALE_CLIENTID, -NFS4ERR_STALE_STATEID or
-NFS4ERR_EXPIRED.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 8e469ebd
...@@ -256,12 +256,8 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, ...@@ -256,12 +256,8 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode,
ret = nfs4_wait_clnt_recover(clp); ret = nfs4_wait_clnt_recover(clp);
if (ret == 0) if (ret == 0)
exception->retry = 1; exception->retry = 1;
#if !defined(CONFIG_NFS_V4_1)
break; break;
#else /* !defined(CONFIG_NFS_V4_1) */ #if defined(CONFIG_NFS_V4_1)
if (!nfs4_has_session(server->nfs_client))
break;
/* FALLTHROUGH */
case -NFS4ERR_BADSESSION: case -NFS4ERR_BADSESSION:
case -NFS4ERR_BADSLOT: case -NFS4ERR_BADSLOT:
case -NFS4ERR_BAD_HIGH_SLOT: case -NFS4ERR_BAD_HIGH_SLOT:
...@@ -274,7 +270,7 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, ...@@ -274,7 +270,7 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode,
nfs4_schedule_state_recovery(clp); nfs4_schedule_state_recovery(clp);
exception->retry = 1; exception->retry = 1;
break; break;
#endif /* !defined(CONFIG_NFS_V4_1) */ #endif /* defined(CONFIG_NFS_V4_1) */
case -NFS4ERR_FILE_OPEN: case -NFS4ERR_FILE_OPEN:
if (exception->timeout > HZ) { if (exception->timeout > HZ) {
/* We have retried a decent amount, time to /* We have retried a decent amount, time to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment