Return-Path: Received: from mail-it0-f68.google.com ([209.85.214.68]:35160 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbcIOQqH (ORCPT ); Thu, 15 Sep 2016 12:46:07 -0400 Received: by mail-it0-f68.google.com with SMTP id e20so4991548itc.2 for ; Thu, 15 Sep 2016 09:46:06 -0700 (PDT) From: Trond Myklebust To: anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org, Oleg Drokin Subject: [PATCH v4 02/20] NFSv4.1: Don't check delegations that are already marked as revoked Date: Thu, 15 Sep 2016 12:45:42 -0400 Message-Id: <1473957960-10001-3-git-send-email-trond.myklebust@primarydata.com> In-Reply-To: <1473957960-10001-2-git-send-email-trond.myklebust@primarydata.com> References: <1473957960-10001-1-git-send-email-trond.myklebust@primarydata.com> <1473957960-10001-2-git-send-email-trond.myklebust@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org List-ID: 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 --- fs/nfs/nfs4proc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6b700c59eede..a026156434ae 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); -- 2.7.4