Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp79700ybx; Thu, 31 Oct 2019 16:16:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyyUo2mSqV/f2NvJT7NHeu0qmQDde+ycNIwdrsbNRVZLWvRi13uCmWT5l/bt7c3hOi4N28 X-Received: by 2002:aa7:cf05:: with SMTP id a5mr9164610edy.255.1572563796280; Thu, 31 Oct 2019 16:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572563796; cv=none; d=google.com; s=arc-20160816; b=rI2lXKKfuYIacn74h/ggXQIjjaB3b8MuP4FUWgDQj1AeJZHO1dHf5+/g5akySomIKS /FOj+11B0EYe9zVkgUW1TBvewe8i9UHmqmfQvKf572Wb/9eQ6FNpPeoTtL9fuzRxbqjx n0EySrG6p82KORLv/0M0jj6yqxsGjPQDBSwX3VKgQqJ4tVZ4+Tg9+cQGJ5gSoIBtefDV zDwWREzuVo47QVFhfai+EQigX/YgaDLanYqG8kR695GxNi5zf/nPmTgbkJ37n0OspVDH vIIP41C5gwZGaSuVXqyL+pudprUj0Q3Syg1Sl8snWCB8c5Ler+C+Do285P/K3ZUKE6/w 5TRQ== 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=Qt/cmllgWyFyQXjgEd/PehmbeSEG9aGD5ZDxJMCTumo=; b=SzLejqIStBE5zgOlYAx6T2sq1IaWTgljD26ZDLBDefOT5j7EUzR/fqb7FFlaNEYPIH 18kBznN4HQ3X3UBS/lmBisKKQSAs8gbMxD721md5c1hdWUvCG6tP5LBSqpW3AY0fcjaj WgJq7S2m9v3aF0/t8egUNvxKcsdAnEwL1IqUgQVr7Wey43D+dLgpaWtQjxZBdQycTirr MRSXkCbB7bAutDGrqJByw9ytz4vuMmxQu+TXWv+7C3oGD3tXxViarPfyWH9b97qSnQKN Gii2Bcq4TaVbZ3HDU7hDOH9C8bIqVMVXzXOCh23w6uw3dZWz6QBdkp3Rqx597JV3gdh1 nnxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dHdHmkJX; 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 3si6261860edw.274.2019.10.31.16.16.12; Thu, 31 Oct 2019 16:16:36 -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=dHdHmkJX; 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 S1727883AbfJaWnY (ORCPT + 99 others); Thu, 31 Oct 2019 18:43:24 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:40689 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727611AbfJaWnX (ORCPT ); Thu, 31 Oct 2019 18:43:23 -0400 Received: by mail-yw1-f66.google.com with SMTP id a67so2787749ywg.7 for ; Thu, 31 Oct 2019 15:43:23 -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=Qt/cmllgWyFyQXjgEd/PehmbeSEG9aGD5ZDxJMCTumo=; b=dHdHmkJXa7esx20smKDriVkcHdtWvHxQQB3ECLetMA2Gw/uRuC+M6sgaDk1gsPBxGA MQi3Nh7Ez5C4/N4wCv5LnngfGtu6/9354Btqph8n55G5AoSs+1BA5E1pSu7/6C1LX3Kh Ft4adl88Ra+JDRoZiIwfhjnCBGTD7lRorAXHEiPiSI6UCAxs10JTHUF5TLTAURwL9uAb BKsU7IMjvxs8V9a4d/o/azDvA6FmHCXAUCrom52Fz1EIkdBtcOJJyTSAQf4zJI67ew3I Sh85kE1V78keO5Hx5cP9hpC2/yESVYIurx3lfJnHXgBLdzHH4krlRqPsNDdDc8b4Nt3v xg2A== 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=Qt/cmllgWyFyQXjgEd/PehmbeSEG9aGD5ZDxJMCTumo=; b=MmVkbDPurKlqQ3saCVTWPE3EaC8hPYSUXjR4GArPVrx3PmZi/znYhGyLbE/HcQPa/B Z+x4piC6B5tyVtXXAIPOBgs4vR5L4WkxGcruqepiikyYQtUfVMA5XWW7I5g1xpz1s7Al LqQ0S8/F/F4hCMy8/iADQd4EHuS36TBpmJU1kuba8jFm1w7l9sqgyLf1KCjr1ZmEXsIy sO3r87uX/fqJIKiMJAw0/RHuxlI5bjg0wogrOzWV69PM7PTqGkwdIZF/NuQoy4urt73m cIsDfufERtmUma1DGkJcSrZnum5jKiBonhZxXsD7NFVS6ZaRqGUR3/zVYl52XMLnPuBY ungg== X-Gm-Message-State: APjAAAXcwpBJ2Dzawx4PTqkb4l+4TgYQka21KnpAion//v0Kdl+kVhpi 16Jhb8M0mtO7VpxU5DvTmqzwA2I= X-Received: by 2002:a81:4948:: with SMTP id w69mr6312034ywa.404.1572561802541; Thu, 31 Oct 2019 15:43:22 -0700 (PDT) Received: from localhost.localdomain ([50.105.87.1]) by smtp.gmail.com with ESMTPSA id d192sm1720287ywb.3.2019.10.31.15.43.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2019 15:43:21 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH v2 14/20] NFSv4: Don't reclaim delegations that have been returned or revoked Date: Thu, 31 Oct 2019 18:40:45 -0400 Message-Id: <20191031224051.8923-15-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191031224051.8923-14-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> <20191031224051.8923-7-trond.myklebust@hammerspace.com> <20191031224051.8923-8-trond.myklebust@hammerspace.com> <20191031224051.8923-9-trond.myklebust@hammerspace.com> <20191031224051.8923-10-trond.myklebust@hammerspace.com> <20191031224051.8923-11-trond.myklebust@hammerspace.com> <20191031224051.8923-12-trond.myklebust@hammerspace.com> <20191031224051.8923-13-trond.myklebust@hammerspace.com> <20191031224051.8923-14-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 has already been revoked, we want to avoid reclaiming it on reboot. Signed-off-by: Trond Myklebust --- fs/nfs/delegation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index ebd83e4db300..78df1cde286e 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -199,7 +199,7 @@ void nfs_inode_reclaim_delegation(struct inode *inode, const struct cred *cred, delegation = rcu_dereference(NFS_I(inode)->delegation); if (delegation != NULL) { spin_lock(&delegation->lock); - if (delegation->inode != NULL) { + if (nfs4_is_valid_delegation(delegation, 0)) { nfs4_stateid_copy(&delegation->stateid, stateid); delegation->type = type; delegation->pagemod_limit = pagemod_limit; -- 2.23.0