aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
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/nfs4proc.c
parent2628eddff15cb38b7246d5c18e2f7dc3e2c0d0c2 (diff)
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/nfs4proc.c')
-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 68463d0ba9b3..fb62919f7f2c 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -436,24 +436,6 @@ out:
436 return ret_id; 436 return ret_id;
437} 437}
438 438
439static int nfs4_recover_session(struct nfs4_session *session)
440{
441 struct nfs_client *clp = session->clp;
442 unsigned int loop;
443 int ret;
444
445 for (loop = NFS4_MAX_LOOP_ON_RECOVER; loop != 0; loop--) {
446 ret = nfs4_wait_clnt_recover(clp);
447 if (ret != 0)
448 break;
449 if (!test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
450 break;
451 nfs4_schedule_state_manager(clp);
452 ret = -EIO;
453 }
454 return ret;
455}
456
457static int nfs41_setup_sequence(struct nfs4_session *session, 439static int nfs41_setup_sequence(struct nfs4_session *session,
458 struct nfs4_sequence_args *args, 440 struct nfs4_sequence_args *args,
459 struct nfs4_sequence_res *res, 441 struct nfs4_sequence_res *res,
@@ -462,7 +444,6 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
462{ 444{
463 struct nfs4_slot *slot; 445 struct nfs4_slot *slot;
464 struct nfs4_slot_table *tbl; 446 struct nfs4_slot_table *tbl;
465 int status = 0;
466 u8 slotid; 447 u8 slotid;
467 448
468 dprintk("--> %s\n", __func__); 449 dprintk("--> %s\n", __func__);
@@ -485,11 +466,10 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
485 466
486 /* The slot table is empty; start the reset thread */ 467 /* The slot table is empty; start the reset thread */
487 dprintk("%s Session Reset\n", __func__); 468 dprintk("%s Session Reset\n", __func__);
469 rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL);
470 nfs4_schedule_state_manager(session->clp);
488 spin_unlock(&tbl->slot_tbl_lock); 471 spin_unlock(&tbl->slot_tbl_lock);
489 status = nfs4_recover_session(session); 472 return -EAGAIN;
490 if (status)
491 return status;
492 spin_lock(&tbl->slot_tbl_lock);
493 } 473 }
494 474
495 slotid = nfs4_find_slot(tbl, task); 475 slotid = nfs4_find_slot(tbl, task);