diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-09-22 13:39:01 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2016-09-27 14:33:55 -0400 |
commit | 63d63cbf5e03f47c99baa0a1ba1c345fe426e3bd (patch) | |
tree | 73e6cda700a7d801ea7aa1300b0e2fe90979c66d /fs/nfs | |
parent | bb3d1a3b24b61d8dd87e2d8c127a92ec8dd5d0d4 (diff) |
NFSv4.1: Don't recheck delegations that have already been checked
Ensure we don't spam the server with test_stateid() calls for
delegations that have already been checked.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Tested-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 083786aad83c..dfa46e49e356 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2459,6 +2459,11 @@ static void nfs41_check_delegation_stateid(struct nfs4_state *state) | |||
2459 | return; | 2459 | return; |
2460 | } | 2460 | } |
2461 | 2461 | ||
2462 | if (!test_and_clear_bit(NFS_DELEGATION_TEST_EXPIRED, &delegation->flags)) { | ||
2463 | rcu_read_unlock(); | ||
2464 | return; | ||
2465 | } | ||
2466 | |||
2462 | cred = get_rpccred(delegation->cred); | 2467 | cred = get_rpccred(delegation->cred); |
2463 | rcu_read_unlock(); | 2468 | rcu_read_unlock(); |
2464 | status = nfs41_test_and_free_expired_stateid(server, &stateid, cred); | 2469 | status = nfs41_test_and_free_expired_stateid(server, &stateid, cred); |