Skip to content

Commit

Permalink
NFSv4.1: Don't recheck delegations that have already been checked
Browse files Browse the repository at this point in the history
Ensure we don't spam the server with test_stateid() calls for
delegations that have already been checked.

Signed-off-by: Trond Myklebust <[email protected]>
Tested-by: Oleg Drokin <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
trondmypd authored and amschuma-ntap committed Sep 27, 2016
1 parent bb3d1a3 commit 63d63cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2459,6 +2459,11 @@ static void nfs41_check_delegation_stateid(struct nfs4_state *state)
return;
}

if (!test_and_clear_bit(NFS_DELEGATION_TEST_EXPIRED, &delegation->flags)) {
rcu_read_unlock();
return;
}

cred = get_rpccred(delegation->cred);
rcu_read_unlock();
status = nfs41_test_and_free_expired_stateid(server, &stateid, cred);
Expand Down

0 comments on commit 63d63cb

Please sign in to comment.