Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp79173ybx; Thu, 31 Oct 2019 16:15:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/mBs891n153+b9AsCAtabQutgS+VIF9yzxx4+f09XTUzEzOq4HPAHLcCm9bs+oYXBIYaV X-Received: by 2002:a17:906:4488:: with SMTP id y8mr6781256ejo.322.1572563757418; Thu, 31 Oct 2019 16:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572563757; cv=none; d=google.com; s=arc-20160816; b=j8cp8reK2fwnkweeVXD1ldt6cvTjDo31yoLf/YVZCaDP98+0E7FNmH+MHudcj0thV0 CYSdFBJDx1ITrpsC4+Ik+EJL1wQLNIWvg1ckJCZNvmiBN9Imrfedb/th+0g+fGMvePHJ IWSNr+SOuRah7LTHPriqZ1V12DAAKCWaMswH2QWtr9EVokKNVuWBX9SEVc/zBDGIBcT5 dwQDzf2c+u0OX6HBEe1UdoEnZSUZyOHcm1rUZ5zfqL4y2D0CGma6TtsNKyjtDyV7+I9L lyPms02rUvHSIC4xTbxkebmq1waHCdZ/92P5Gon5KFuI+owZygkAUjQ3x5CDh/WttOlY 7gZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=UlqTHE9RJ9ECVULqQDQnX713O/HJPvYKOpACXCXCWSg=; b=pswMRxyaEBDmhpVPnpfSduZSeGAGhE3sJPWxNrwJ7wWAgBe8ErJG1Ma2xfqx43IR8q ud8J6mj1LFUI23wvIZFVDnu8pQ6q3JBBPeRhdxSLAwelafLRYZlXlp8Y4AHM8cVIDRpR xf3KO0le9yBqyVRNd0Zk6xbORyt75wrCgm5zwns+b5txrrcRI/MWdsatfIWQ2OzpcWxf n+V7lD47Khq1rYCSLRCKyoO7XW7jWv4seBRECTMENsS8IL5KHh+z4yMCH+cFmeamEerO OPCvnULLdbpxl6CgA7wUUbuBzxCG2o8ILq0wIYGZJfbCuihHJjl/Iz2V3Zw0BYlQDE71 h6pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gv3X9sYr; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22si4795123ejx.15.2019.10.31.16.15.24; Thu, 31 Oct 2019 16:15:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gv3X9sYr; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbfJaWnN (ORCPT + 99 others); Thu, 31 Oct 2019 18:43:13 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:34735 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727611AbfJaWnN (ORCPT ); Thu, 31 Oct 2019 18:43:13 -0400 Received: by mail-yw1-f65.google.com with SMTP id z144so1170883ywd.1 for ; Thu, 31 Oct 2019 15:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UlqTHE9RJ9ECVULqQDQnX713O/HJPvYKOpACXCXCWSg=; b=Gv3X9sYrbGOtIElJQq9KkNDi9vyL7x9RXdyQV3I6nsKP8SeoQxXITX93r/NepiYPQo O97wxR8ZJ+SwKJ+2VRK4BeBSAFJNPFbi793DXFh5xlAB/P2ZA7iFIN+I9gD5lFkxhS3q dGlF00blonqiy+hZBgFE4Et/5/wo2ycuV6r/Ep0+2J59FAv/yBTzb+4RNJrbapV+EruH Goh2Kg+CyvbVu4TB+9BAB9/Qbne11T2/IgYfuSLMMyXNIzbFeSvrjMqqx52hT7uvRcpn lhCUMxfkfkCsEEGxZot7sUBwdxWbuSwG4po+hCt3/vaOZWxspEjz//daR/3h9p1wiVwR 2CMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UlqTHE9RJ9ECVULqQDQnX713O/HJPvYKOpACXCXCWSg=; b=UyE8wW+TKKz4bVju/8+VMVYEIJOZ4VmAKlFCzyYJ0wmyYGhyJvkk1kl3tSeu3aC9eI vMgFMzXRClaUXX4HSkzoQnssyrjmdrToyowcoGoJ51IRNLa6OaGlCADWPJcMXhpf2OlQ 1lmo/0FADlrmeUXalM+vqot0/C+SLej9lvuxDYEa8yk8SS0GIl2D/SUSvRfjHQpdm2RP etfggKxHL1M2kihVqAMm5eP/qp0PGmRgL8t/LA+QqAkj6OSFmm4i539QfG6yrex8NiTb cXkTbQJ+fZuGbgdWyR6xlDIl94egytcLXFARAX4dB3ChKnJMWx0azs7gRp8mzJ/kTs85 zENA== X-Gm-Message-State: APjAAAV7dSpAfpcJb2zd4xlKQyo7pOmtsTBJuXwIscrMTw/BUqeKYSou SFNSh7Dpw/oEq7cVGW13WE2ZKPw= X-Received: by 2002:a81:b188:: with SMTP id p130mr4829632ywh.482.1572561791369; Thu, 31 Oct 2019 15:43:11 -0700 (PDT) Received: from localhost.localdomain ([50.105.87.1]) by smtp.gmail.com with ESMTPSA id d192sm1720287ywb.3.2019.10.31.15.43.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2019 15:43:10 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH v2 06/20] NFSv4: fail nfs4_refresh_delegation_stateid() when the delegation was revoked Date: Thu, 31 Oct 2019 18:40:37 -0400 Message-Id: <20191031224051.8923-7-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191031224051.8923-6-trond.myklebust@hammerspace.com> References: <20191031224051.8923-1-trond.myklebust@hammerspace.com> <20191031224051.8923-2-trond.myklebust@hammerspace.com> <20191031224051.8923-3-trond.myklebust@hammerspace.com> <20191031224051.8923-4-trond.myklebust@hammerspace.com> <20191031224051.8923-5-trond.myklebust@hammerspace.com> <20191031224051.8923-6-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org If the delegation was revoked, we don't want to retry the delegreturn. Signed-off-by: Trond Myklebust --- fs/nfs/delegation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index c34bb81d37e2..630167e243be 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -1190,7 +1190,8 @@ bool nfs4_refresh_delegation_stateid(nfs4_stateid *dst, struct inode *inode) rcu_read_lock(); delegation = rcu_dereference(NFS_I(inode)->delegation); if (delegation != NULL && - nfs4_stateid_match_other(dst, &delegation->stateid)) { + nfs4_stateid_match_other(dst, &delegation->stateid) && + !test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) { dst->seqid = delegation->stateid.seqid; ret = true; } -- 2.23.0