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>
This commit is contained in:
Trond Myklebust 2016-09-22 13:39:01 -04:00 committed by Anna Schumaker
parent bb3d1a3b24
commit 63d63cbf5e

View File

@ -2459,6 +2459,11 @@ static void nfs41_check_delegation_stateid(struct nfs4_state *state)
return; return;
} }
if (!test_and_clear_bit(NFS_DELEGATION_TEST_EXPIRED, &delegation->flags)) {
rcu_read_unlock();
return;
}
cred = get_rpccred(delegation->cred); cred = get_rpccred(delegation->cred);
rcu_read_unlock(); rcu_read_unlock();
status = nfs41_test_and_free_expired_stateid(server, &stateid, cred); status = nfs41_test_and_free_expired_stateid(server, &stateid, cred);