Skip to content

Commit

Permalink
NFSv4.1: Don't call nfs4_schedule_state_recovery() unnecessarily
Browse files Browse the repository at this point in the history
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: Trond Myklebust <Trond.Myklebust@netapp.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jan 26, 2010
1 parent 8e469eb commit 0339169
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,8 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode,
ret = nfs4_wait_clnt_recover(clp);
if (ret == 0)
exception->retry = 1;
#if !defined(CONFIG_NFS_V4_1)
break;
#else /* !defined(CONFIG_NFS_V4_1) */
if (!nfs4_has_session(server->nfs_client))
break;
/* FALLTHROUGH */
#if defined(CONFIG_NFS_V4_1)
case -NFS4ERR_BADSESSION:
case -NFS4ERR_BADSLOT:
case -NFS4ERR_BAD_HIGH_SLOT:
Expand All @@ -274,7 +270,7 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode,
nfs4_schedule_state_recovery(clp);
exception->retry = 1;
break;
#endif /* !defined(CONFIG_NFS_V4_1) */
#endif /* defined(CONFIG_NFS_V4_1) */
case -NFS4ERR_FILE_OPEN:
if (exception->timeout > HZ) {
/* We have retried a decent amount, time to
Expand Down

0 comments on commit 0339169

Please sign in to comment.