From patchwork Wed Aug 31 02:11:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 9306239 X-Patchwork-Delegate: Trond.Myklebust@netapp.com 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 B0625607F0 for ; Wed, 31 Aug 2016 02:12:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A010D28DE7 for ; Wed, 31 Aug 2016 02:12:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 951F028E08; Wed, 31 Aug 2016 02:12:16 +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 2533828DE7 for ; Wed, 31 Aug 2016 02:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758196AbcHaCMO (ORCPT ); Tue, 30 Aug 2016 22:12:14 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:35599 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757620AbcHaCMO (ORCPT ); Tue, 30 Aug 2016 22:12:14 -0400 Received: by mail-it0-f68.google.com with SMTP id f128so4119528ith.2 for ; Tue, 30 Aug 2016 19:12:13 -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=kf3LFf4B5bhEak6tSAYXJ3k+fmbZp3+4C9WjUABHWRU=; b=NdXb5zZVa5r4KEAcjp1JY6BxXCqirjU/8xFBNEb96HKptgXeda6jL4iHYl2mZKgBHo 9/AjAnRDkGcp60BTQM1ZIwTosXUlsbYpUpSXyTxFSJOX2eflmlf45A8xjeh/mrjaubxI 8yOnRjzzl9lK4zmM28+UXLy7PgjtvMu8obWfAoG7y/jyh7sJehqPNtcW5q5Uzp3o9bxA VYaKXtep2UnI9xZvDrMvAw+DHMEqPgYQVFPeoyPQBvQnZoKowcUr+Nz7FN7IdLpXQPh3 WCQJf2V/czTl1JEbSh/Hhnu4vXtHuVdfkb7NSR5SUNfx+bIlK9r40sS0+87Ea8IHJ2vX isbQ== 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=kf3LFf4B5bhEak6tSAYXJ3k+fmbZp3+4C9WjUABHWRU=; b=ENXIVZrt4j0RB22JUVU38yX+KysR8ZwrsI1TQOIle4HncxgvVZogfXGVwF53gAIk3x m1KL65NLpdz6zN6nEN35NrSOoD6y+aj07zqVEYO1ed/YMGwHgh+nc9+H354qjxXEy162 0CKyJG0TOJjx0SCYJ2zHcwJ3BGya5QR7U/Oyra98+9JGVvoYTgDvllHn0wPiBdAygAAC P97kPTM6RHnENii//+Ml9jV+s5MtZyBdDRKIEzXtctHfrIiLKotfA/TiL6IEbfbn8/4g OxsmugaG/Gl5mw53AJawm9honoKH462ijb+ni77yjIv3tp7Koou0QMAGf0H3MMSFLekU cY2g== X-Gm-Message-State: AE9vXwN5IHisq5srN5qV8lItV9wI3glgj/PdbIrOJsaWT1w7TIewP/JFe65buJoiYpFOqw== X-Received: by 10.107.168.214 with SMTP id e83mr2790162ioj.177.1472609533127; Tue, 30 Aug 2016 19:12:13 -0700 (PDT) Received: from leira.trondhjem.org.localdomain (c-68-49-162-121.hsd1.mi.comcast.net. [68.49.162.121]) by smtp.gmail.com with ESMTPSA id x77sm895268ioi.3.2016.08.30.19.12.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Aug 2016 19:12:12 -0700 (PDT) From: Trond Myklebust To: anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH 1/7] NFSv4.1: Don't check delegations that are already marked as revoked Date: Tue, 30 Aug 2016 22:11:38 -0400 Message-Id: <1472609504-69094-2-git-send-email-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472609504-69094-1-git-send-email-trond.myklebust@primarydata.com> References: <1472609504-69094-1-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 e924907cccef..255800b12fad 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -2420,6 +2420,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);