summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-10-30 16:06:35 -0400
committerBen Hutchings <ben@decadent.org.uk>2012-11-16 16:47:03 +0000
commit0182399b8032adcc5123ac9ab4634c1f060cb7fd (patch)
tree43a659ab7bc9517492873fecadc69dd8a9ae303d /fs
parentc2ba72569bfde13675ef00ed3f44f500f0d7c10a (diff)
downloadlinux-stable-0182399b8032adcc5123ac9ab4634c1f060cb7fd.tar.gz
linux-stable-0182399b8032adcc5123ac9ab4634c1f060cb7fd.tar.bz2
linux-stable-0182399b8032adcc5123ac9ab4634c1f060cb7fd.zip
NFS: Wait for session recovery to finish before returning
commit 399f11c3d872bd748e1575574de265a6304c7c43 upstream. Currently, we will schedule session recovery and then return to the caller of nfs4_handle_exception. This works for most cases, but causes a hang on the following test case: Client Server ------ ------ Open file over NFS v4.1 Write to file Expire client Try to lock file The server will return NFS4ERR_BADSESSION, prompting the client to schedule recovery. However, the client will continue placing lock attempts and the open recovery never seems to be scheduled. The simplest solution is to wait for session recovery to run before retrying the lock. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 61796a402e2c..2468fac28c03 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -303,8 +303,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
dprintk("%s ERROR: %d Reset session\n", __func__,
errorcode);
nfs4_schedule_session_recovery(clp->cl_session);
- exception->retry = 1;
- break;
+ goto wait_on_recovery;
#endif /* defined(CONFIG_NFS_V4_1) */
case -NFS4ERR_FILE_OPEN:
if (exception->timeout > HZ) {