From patchwork Thu Sep 22 17:38:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 9346001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 953E0607D0 for ; Thu, 22 Sep 2016 17:39:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E7DD2ABFE for ; Thu, 22 Sep 2016 17:39:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 834952AC04; Thu, 22 Sep 2016 17:39:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23E6F2ABFE for ; Thu, 22 Sep 2016 17:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965883AbcIVRjn (ORCPT ); Thu, 22 Sep 2016 13:39:43 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36009 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964779AbcIVRjh (ORCPT ); Thu, 22 Sep 2016 13:39:37 -0400 Received: by mail-it0-f67.google.com with SMTP id n143so5336167ita.3 for ; Thu, 22 Sep 2016 10:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=YmElvZiASZPAZ+/XhscG+J+R8Rj52lC5KHzeCS4Kbcs=; b=pO7wHfY1kHyDjsXA08sRek9bUSfXDjIzDRS3jFZNOqjGOrhRwCTRbyrQJpez/zCER9 QlhdFfg9VjbRo07cKIi8PHsQ2KwTfbTE0QizSLWxAto5+0edDzBq+5TPkZ8v1pY4Gl4B kfwwyrOZDHJve7urBO7yDfOHG/wVBi6UNKnhKdJoloViPKNn+JbB+0EH7JHG+srlj64z 7lI8q0Prh3ClFXnULJy0PWJF2vebp8/GLA1OJyTccO+4yWbdnHJfrSii69VUgprF7mXj QQkaqzhmXm6rqdifRfWfaoo1gQvQg0WJmRouK7g9BgUrTN8fF0LFzmnJW9e2nDemqiw2 Ks3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=YmElvZiASZPAZ+/XhscG+J+R8Rj52lC5KHzeCS4Kbcs=; b=YQRGRzW4g2OiY/ySt1uti2d4PN0qPNHSiGQwtGaD38tXvnaO6FOCjIXi+nDvrNsyO+ 9w7mfi8tlLmA8iAi3IxpSHuuKf6+peYCKIip8n/CPBvfSPdh6tBQjhwEaDExl+Td6Asb unEivFZD0+xiHIWZpRHhaQnA75ONkNdXug009lsPd/EDb1GMAVFr8gy3VOLT5ICb5UMs /GYIcaiD8K1RhjC/n1F6Y62tU3etYb++yF6llvzsqwFihHv9pPAQvODzs/6BLPDc8N55 ZO/sjBsRMeniCY/jeaYhTr0qSeTIx0AlOuFGULY6zHfs3umzHBrflDO4kNky1CszcuK/ Gyhg== X-Gm-Message-State: AE9vXwMzFpRe25/44vLBJ7G497p69FhBHU4c8516Gp/GtJZxz4r5e5isyAUdkrNuak/srw== X-Received: by 10.36.219.65 with SMTP id c62mr12607683itg.44.1474565971514; Thu, 22 Sep 2016 10:39:31 -0700 (PDT) Received: from leira.trondhjem.org.localdomain (50-108-86-94.adr01.mskg.mi.frontiernet.net. [50.108.86.94]) by smtp.gmail.com with ESMTPSA id e66sm1194267itd.22.2016.09.22.10.39.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2016 10:39:30 -0700 (PDT) From: Trond Myklebust To: anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org, Oleg Drokin Subject: [PATCH v7 05/31] NFSv4.1: Don't check delegations that are already marked as revoked Date: Thu, 22 Sep 2016 13:38:55 -0400 Message-Id: <1474565961-21303-6-git-send-email-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474565961-21303-5-git-send-email-trond.myklebust@primarydata.com> References: <1474565961-21303-1-git-send-email-trond.myklebust@primarydata.com> <1474565961-21303-2-git-send-email-trond.myklebust@primarydata.com> <1474565961-21303-3-git-send-email-trond.myklebust@primarydata.com> <1474565961-21303-4-git-send-email-trond.myklebust@primarydata.com> <1474565961-21303-5-git-send-email-trond.myklebust@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);