aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);