From: Trond Myklebust Date: Thu, 22 Sep 2016 17:38:55 +0000 (-0400) Subject: NFSv4.1: Don't check delegations that are already marked as revoked X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c8e5447465c9cf92ff1c5e36e8f316b69d46aa8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git NFSv4.1: Don't check delegations that are already marked as revoked 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 Tested-by: Olek Drokin Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 9369639fef05..6bbcd2f24e22 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -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);