diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-09-30 17:21:41 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-09-30 17:21:41 -0400 |
commit | 72c23f0819977d37924af92a42a9b7fbfd1c95d8 (patch) | |
tree | a0c10114d96c40f8e38887c346ec593a51321781 /fs/nfs/nfs4state.c | |
parent | 3fc3edf141fd78f624194eb89d7b37ff86138422 (diff) | |
parent | d1f456b0b9545f1606a54cd17c20775f159bd2ce (diff) |
Merge branch 'bugfixes' into linux-next
* bugfixes:
NFSv4.1: Fix an NFSv4.1 state renewal regression
NFSv4: fix open/lock state recovery error handling
NFSv4: Fix lock recovery when CREATE_SESSION/SETCLIENTID_CONFIRM fails
NFS: Fabricate fscache server index key correctly
SUNRPC: Add missing support for RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT
nfs: fix duplicate proc entries
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 6678769e1a54..5194933ed419 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1705,7 +1705,8 @@ restart: | |||
1705 | if (status < 0) { | 1705 | if (status < 0) { |
1706 | set_bit(ops->owner_flag_bit, &sp->so_flags); | 1706 | set_bit(ops->owner_flag_bit, &sp->so_flags); |
1707 | nfs4_put_state_owner(sp); | 1707 | nfs4_put_state_owner(sp); |
1708 | return nfs4_recovery_handle_error(clp, status); | 1708 | status = nfs4_recovery_handle_error(clp, status); |
1709 | return (status != 0) ? status : -EAGAIN; | ||
1709 | } | 1710 | } |
1710 | 1711 | ||
1711 | nfs4_put_state_owner(sp); | 1712 | nfs4_put_state_owner(sp); |
@@ -1714,7 +1715,7 @@ restart: | |||
1714 | spin_unlock(&clp->cl_lock); | 1715 | spin_unlock(&clp->cl_lock); |
1715 | } | 1716 | } |
1716 | rcu_read_unlock(); | 1717 | rcu_read_unlock(); |
1717 | return status; | 1718 | return 0; |
1718 | } | 1719 | } |
1719 | 1720 | ||
1720 | static int nfs4_check_lease(struct nfs_client *clp) | 1721 | static int nfs4_check_lease(struct nfs_client *clp) |
@@ -1761,7 +1762,6 @@ static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status) | |||
1761 | break; | 1762 | break; |
1762 | case -NFS4ERR_STALE_CLIENTID: | 1763 | case -NFS4ERR_STALE_CLIENTID: |
1763 | clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); | 1764 | clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); |
1764 | nfs4_state_clear_reclaim_reboot(clp); | ||
1765 | nfs4_state_start_reclaim_reboot(clp); | 1765 | nfs4_state_start_reclaim_reboot(clp); |
1766 | break; | 1766 | break; |
1767 | case -NFS4ERR_CLID_INUSE: | 1767 | case -NFS4ERR_CLID_INUSE: |
@@ -2367,14 +2367,11 @@ static void nfs4_state_manager(struct nfs_client *clp) | |||
2367 | section = "reclaim reboot"; | 2367 | section = "reclaim reboot"; |
2368 | status = nfs4_do_reclaim(clp, | 2368 | status = nfs4_do_reclaim(clp, |
2369 | clp->cl_mvops->reboot_recovery_ops); | 2369 | clp->cl_mvops->reboot_recovery_ops); |
2370 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || | 2370 | if (status == -EAGAIN) |
2371 | test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) | ||
2372 | continue; | ||
2373 | nfs4_state_end_reclaim_reboot(clp); | ||
2374 | if (test_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state)) | ||
2375 | continue; | 2371 | continue; |
2376 | if (status < 0) | 2372 | if (status < 0) |
2377 | goto out_error; | 2373 | goto out_error; |
2374 | nfs4_state_end_reclaim_reboot(clp); | ||
2378 | } | 2375 | } |
2379 | 2376 | ||
2380 | /* Now recover expired state... */ | 2377 | /* Now recover expired state... */ |
@@ -2382,9 +2379,7 @@ static void nfs4_state_manager(struct nfs_client *clp) | |||
2382 | section = "reclaim nograce"; | 2379 | section = "reclaim nograce"; |
2383 | status = nfs4_do_reclaim(clp, | 2380 | status = nfs4_do_reclaim(clp, |
2384 | clp->cl_mvops->nograce_recovery_ops); | 2381 | clp->cl_mvops->nograce_recovery_ops); |
2385 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || | 2382 | if (status == -EAGAIN) |
2386 | test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state) || | ||
2387 | test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) | ||
2388 | continue; | 2383 | continue; |
2389 | if (status < 0) | 2384 | if (status < 0) |
2390 | goto out_error; | 2385 | goto out_error; |