From da7f73405311b8626633fa0a4719a21505f83aa8 Mon Sep 17 00:00:00 2001 From: Andy Adamson Date: Fri, 4 Dec 2009 16:02:14 -0500 Subject: [PATCH] --- yaml --- r: 175965 b: refs/heads/master c: 0b9e2d41f1f0360be08809d4e3bb56b67be6241a h: refs/heads/master i: 175963: f2b66d65969844057f32a5025b23ea49949f32bb v: v3 --- [refs] | 2 +- trunk/fs/nfs/nfs4proc.c | 6 +++--- trunk/fs/nfs/nfs4state.c | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index b4705858bc85..cfa8409b11ff 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 691daf3b0c410c8bcab6735796be03ea446e1924 +refs/heads/master: 0b9e2d41f1f0360be08809d4e3bb56b67be6241a diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c index a0f73e99ff3d..637a6b476bd6 100644 --- a/trunk/fs/nfs/nfs4proc.c +++ b/trunk/fs/nfs/nfs4proc.c @@ -270,7 +270,7 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, case -NFS4ERR_SEQ_MISORDERED: dprintk("%s ERROR: %d Reset session\n", __func__, errorcode); - set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); + nfs4_schedule_state_recovery(clp); exception->retry = 1; break; #endif /* !defined(CONFIG_NFS_V4_1) */ @@ -466,7 +466,7 @@ static int nfs41_setup_sequence(struct nfs4_session *session, tbl = &session->fc_slot_table; spin_lock(&tbl->slot_tbl_lock); - if (test_bit(NFS4CLNT_SESSION_RESET, &session->clp->cl_state)) { + if (test_bit(NFS4CLNT_SESSION_DRAINING, &session->clp->cl_state)) { /* * The state manager will wait until the slot table is empty. * Schedule the reset thread @@ -3368,7 +3368,7 @@ _nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, case -NFS4ERR_SEQ_MISORDERED: dprintk("%s ERROR %d, Reset session\n", __func__, task->tk_status); - set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); + nfs4_schedule_state_recovery(clp); task->tk_status = 0; return -EAGAIN; #endif /* CONFIG_NFS_V4_1 */ diff --git a/trunk/fs/nfs/nfs4state.c b/trunk/fs/nfs/nfs4state.c index 3c1433598b60..46c69e2248e3 100644 --- a/trunk/fs/nfs/nfs4state.c +++ b/trunk/fs/nfs/nfs4state.c @@ -1094,6 +1094,8 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error) case -NFS4ERR_SEQ_FALSE_RETRY: case -NFS4ERR_SEQ_MISORDERED: set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); + /* Zero session reset errors */ + return 0; } return error; } @@ -1191,7 +1193,6 @@ static int nfs4_reset_session(struct nfs_client *clp) set_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state); spin_unlock(&tbl->slot_tbl_lock); status = wait_for_completion_interruptible(&ses->complete); - clear_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state); if (status) /* -ERESTARTSYS */ goto out; } else { @@ -1212,6 +1213,7 @@ static int nfs4_reset_session(struct nfs_client *clp) /* fall through*/ out: /* Wake up the next rpc task even on error */ + clear_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state); rpc_wake_up_next(&clp->cl_session->fc_slot_table.slot_tbl_waitq); return status; }