aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index f8c06dec6563..32cce4a276e8 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1615,7 +1615,7 @@ void nfs41_handle_recall_slot(struct nfs_client *clp)
1615static void nfs4_reset_all_state(struct nfs_client *clp) 1615static void nfs4_reset_all_state(struct nfs_client *clp)
1616{ 1616{
1617 if (test_and_set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) == 0) { 1617 if (test_and_set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) == 0) {
1618 clp->cl_boot_time = CURRENT_TIME; 1618 set_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state);
1619 nfs4_state_start_reclaim_nograce(clp); 1619 nfs4_state_start_reclaim_nograce(clp);
1620 nfs4_schedule_state_manager(clp); 1620 nfs4_schedule_state_manager(clp);
1621 } 1621 }
@@ -1631,7 +1631,6 @@ static void nfs41_handle_server_reboot(struct nfs_client *clp)
1631 1631
1632static void nfs41_handle_state_revoked(struct nfs_client *clp) 1632static void nfs41_handle_state_revoked(struct nfs_client *clp)
1633{ 1633{
1634 /* Temporary */
1635 nfs4_reset_all_state(clp); 1634 nfs4_reset_all_state(clp);
1636} 1635}
1637 1636
@@ -1652,6 +1651,10 @@ void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags)
1652{ 1651{
1653 if (!flags) 1652 if (!flags)
1654 return; 1653 return;
1654
1655 dprintk("%s: \"%s\" (client ID %llx) flags=0x%08x\n",
1656 __func__, clp->cl_hostname, clp->cl_clientid, flags);
1657
1655 if (flags & SEQ4_STATUS_RESTART_RECLAIM_NEEDED) 1658 if (flags & SEQ4_STATUS_RESTART_RECLAIM_NEEDED)
1656 nfs41_handle_server_reboot(clp); 1659 nfs41_handle_server_reboot(clp);
1657 if (flags & (SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED | 1660 if (flags & (SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED |
@@ -1762,6 +1765,12 @@ static void nfs4_state_manager(struct nfs_client *clp)
1762 1765
1763 /* Ensure exclusive access to NFSv4 state */ 1766 /* Ensure exclusive access to NFSv4 state */
1764 do { 1767 do {
1768 if (test_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state)) {
1769 nfs4_reclaim_lease(clp);
1770 clear_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state);
1771 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
1772 }
1773
1765 if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) { 1774 if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) {
1766 /* We're going to have to re-establish a clientid */ 1775 /* We're going to have to re-establish a clientid */
1767 status = nfs4_reclaim_lease(clp); 1776 status = nfs4_reclaim_lease(clp);