From patchwork Wed Sep 7 18:01:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 9319745 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 A3BC5607D3 for ; Wed, 7 Sep 2016 18:02:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8FE1293CF for ; Wed, 7 Sep 2016 18:02:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE116293FF; Wed, 7 Sep 2016 18:02:00 +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=-4.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 AE222293CF for ; Wed, 7 Sep 2016 18:01:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934812AbcIGSB6 (ORCPT ); Wed, 7 Sep 2016 14:01:58 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:33792 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935248AbcIGSB4 (ORCPT ); Wed, 7 Sep 2016 14:01:56 -0400 Received: by mail-it0-f65.google.com with SMTP id e124so2160672ith.1 for ; Wed, 07 Sep 2016 11:01:56 -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=iEAx+my9gfx+WxKwf3vRm5A3+jvegy2so+qMFzrM7N0=; b=H7ipTmDx2GOwAg4zvcXKKol7+GmdpdOCYc+Fx9E5//j7fIymoiq7BcvS0WBVTk7WRs HCyoZ0trFSfxXRRamoB2c+biFNWrg/KvUYi9djyh4a+dqenFZ254HzhEqIkGE+KgN79w T5jHgQAmB4hrzG1ccA7jGxSQk2zm/arzdek+LtnOFpqMs6333mBHed3M+EqA3ZVVPOmz YjO43IaXkoez5SA19U62o3koN/QsZEH4KFPv6tF1WDBDhf5KuDSgd0kiwPZncKYObIE7 i4dCJ7PzxOPllZPr7NCz9AkKXYr8o5ElOi2zQUzZrWsYfWOS8VVwpLbWE/+9RQsl7wju uTmA== 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=iEAx+my9gfx+WxKwf3vRm5A3+jvegy2so+qMFzrM7N0=; b=CGd4CWGTRS3scOn7mMIeDy8T1Nn8X2qUrbTplSpyA/wfjYjLtnd1Lo0AMIFEDQkY7X SBam2JCF54k2teK21FVQnrsHLuEjxznKlkLg0tJ2m/VOoX8u0U4nTcOtraodnMn9PU8u 2ZT8jUCsWHyJD3RIVyboWyA85Vb6CVLsHHsr0GriKoOqxfTroesls+06DFi+H857t5FM GWJaOGlDaME9GIWztwFPYP7j5B/Ic+5UZUcVWJCS0hFchYP2VnZsOcXFxVxa5jr+wLHk kfoHNzroCLNq3mVxjrvgm9OxA3s+6TA6AM/WRC1J73qkp9DGHnfqe3KeRzet+5GlSSnD 0gIQ== X-Gm-Message-State: AE9vXwNcXVu80eZNR1w4+66C21mjNldIbJ5ZtmSaV38bRGGcg69ruX+xNVBRC7Hy7yvi/A== X-Received: by 10.36.130.135 with SMTP id t129mr8957651itd.31.1473271315924; Wed, 07 Sep 2016 11:01:55 -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 v7sm3626003ita.9.2016.09.07.11.01.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 11:01:55 -0700 (PDT) From: Trond Myklebust To: anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 1/7] NFSv4.1: Don't check delegations that are already marked as revoked Date: Wed, 7 Sep 2016 14:01:21 -0400 Message-Id: <1473271287-43478-2-git-send-email-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473271287-43478-1-git-send-email-trond.myklebust@primarydata.com> References: <1473271287-43478-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 25a2af707233..2728ef288a0f 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);