summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-12-04 15:55:37 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-04 15:55:37 -0500
commit05f0d2364726c92f6b870db654967088349379fe (patch)
treeea9fb3fe07c40e859c8db88949eee55a40bbdd9b /fs/nfs
parent2628eddff15cb38b7246d5c18e2f7dc3e2c0d0c2 (diff)
downloadop-kernel-dev-05f0d2364726c92f6b870db654967088349379fe.zip
op-kernel-dev-05f0d2364726c92f6b870db654967088349379fe.tar.gz
nfs41: remove nfs4_recover_session
nfs4_recover_session can put rpciod to sleep. Just use nfs4_schedule_recovery. Reported-by: Trond Myklebust <trond.myklebust@netapp.com> Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 68463d0..fb62919 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -436,24 +436,6 @@ out:
return ret_id;
}
-static int nfs4_recover_session(struct nfs4_session *session)
-{
- struct nfs_client *clp = session->clp;
- unsigned int loop;
- int ret;
-
- for (loop = NFS4_MAX_LOOP_ON_RECOVER; loop != 0; loop--) {
- ret = nfs4_wait_clnt_recover(clp);
- if (ret != 0)
- break;
- if (!test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
- break;
- nfs4_schedule_state_manager(clp);
- ret = -EIO;
- }
- return ret;
-}
-
static int nfs41_setup_sequence(struct nfs4_session *session,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
@@ -462,7 +444,6 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
{
struct nfs4_slot *slot;
struct nfs4_slot_table *tbl;
- int status = 0;
u8 slotid;
dprintk("--> %s\n", __func__);
@@ -485,11 +466,10 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
/* The slot table is empty; start the reset thread */
dprintk("%s Session Reset\n", __func__);
+ rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL);
+ nfs4_schedule_state_manager(session->clp);
spin_unlock(&tbl->slot_tbl_lock);
- status = nfs4_recover_session(session);
- if (status)
- return status;
- spin_lock(&tbl->slot_tbl_lock);
+ return -EAGAIN;
}
slotid = nfs4_find_slot(tbl, task);
OpenPOWER on IntegriCloud