]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
NFSv4.1: Don't check delegations that are already marked as revoked
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 22 Sep 2016 17:38:55 +0000 (13:38 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 27 Sep 2016 18:32:41 +0000 (14:32 -0400)
If the delegation has been marked as revoked, we don't have to test
it, because we should already have called FREE_STATEID on it.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Tested-by: Olek Drokin <green@linuxhacker.ru>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index 9369639fef05a2cef038ac106237a7e40ab9d2e3..6bbcd2f24e222eec67701c913edabfb756e304ba 100644 (file)
@@ -2423,6 +2423,11 @@ static void nfs41_check_delegation_stateid(struct nfs4_state *state)
                rcu_read_unlock();
                return;
        }
+       if (test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) {
+               rcu_read_unlock();
+               nfs_finish_clear_delegation_stateid(state);
+               return;
+       }
 
        nfs4_stateid_copy(&stateid, &delegation->stateid);
        cred = get_rpccred(delegation->cred);