Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp641457pxb; Wed, 29 Sep 2021 06:50:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7hjlpxapBNw54TP90jsCyKGfO+tdFCKkfIjgg0dbf7NA/zkGDZmq+QAizKdp1DGfdx0Z3 X-Received: by 2002:a63:ed17:: with SMTP id d23mr76562pgi.29.1632923426430; Wed, 29 Sep 2021 06:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632923426; cv=none; d=google.com; s=arc-20160816; b=EZeWM69UJBvqnj2u7QPio007xC3+uwMk2l5s+ZOweI8mQvS/UDflwxTPN/uL9V6F7h xdcMZ7kaRGTfxhozXLfrCvquuAT74hJnLOM6H4MGmyR3G6qEqoZNPtcUInWfVF1IdlrO /VLjA2wZb8E1w54bFyHnenyl0gOA6DYZlk/wcakuY1ZbErlg7d3kJmxrIl9CZFXqx8A7 BPgbYJn8Wr3USlXxR/bZc5CFi+1QogHb72eDqt0qARmz2a0ySRWnQ6/avLgMr2U/nRo7 Ck6cZb4Lsmz5FikrhUiA+J4AeiWxSbymmYWZZH4ojhIcyGWHP1mxN+q5cVco2FX0rRU2 seUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=r6Hhzqu1mArQjFQLV/VeSy0/6AF3Vvpz6Lwu1yO7rUE=; b=S2Y1IiYCq/HqAK6uBebhKNqUX/PaQZ6FmKS9vCuhh5jK0GHXOXFAHneykMUpx9OImE qvJzvVIV175LXxxpS7gbf6Tks+TH4eNafFL8MZatUHe/4CB/fkFWXevdTGGKrMADbHMn 0FHYt/pifH2tFfPJWjLidm3JmND+2Ak7ZIVsy+hA8XU7g/71X/5Wp8k/t4NHapnxgy4K uySBXmVezRsCRZqWzH/3+LVds0pniGadH9jKad6pG0eaegdaa7QVV1JJ6+EUf/r/PqPh 43rbTKdi4zOIl9Aa2iAgGlVfeF5hvj49VUDUDnI+wRq/4bHXiCPzgIMdKZC0elq14P2z fTXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KWMTi3Mn; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si3078634pgu.404.2021.09.29.06.50.10; Wed, 29 Sep 2021 06:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KWMTi3Mn; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344324AbhI2Nv2 (ORCPT + 99 others); Wed, 29 Sep 2021 09:51:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:36034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344316AbhI2Nv1 (ORCPT ); Wed, 29 Sep 2021 09:51:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 993D7613A9 for ; Wed, 29 Sep 2021 13:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632923386; bh=lrG1yBbZRwVXxufLVRSbNcJ+4CEV1WmtB1NMXQ4VLbU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KWMTi3MnRIRc3X/pl4ABNAnYcy7RkrLHATF06Dx8tMSXey5MY5X4PayxR5uwtNlts nghP9lW5hGodEEEbqeqcJ1FXt6vZWbwZxojREe8tmWeUTei94dio3Rz0vUoOcHXekc LwECM8IVkNl7vRpCjIEcoha5z1wf1egGHdiDOayybeklceRre7ekifwzsGXYUpgyFX XzFa1GL3E3sU9L/kHCQW3xxE4ADvOJd0/JaX2xtpLSz/SoF92SCIatZ9ZD/uwRNrex SdiDQvatj0ZnU+SKcXDaZbeP3/xYq3nJMKdQUUWWgDJC5eje0B0IFHpuZPclzh/aRd k49DyEQfU2y+g== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 3/5] NFS: Fix up nfs_readdir_inode_mapping_valid() Date: Wed, 29 Sep 2021 09:49:42 -0400 Message-Id: <20210929134944.632844-3-trondmy@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210929134944.632844-2-trondmy@kernel.org> References: <20210929134944.632844-1-trondmy@kernel.org> <20210929134944.632844-2-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust The check for duplicate readdir cookies should only care if the change attribute is invalid or the data cache is invalid. Signed-off-by: Trond Myklebust --- fs/nfs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index f2df664db020..fa4d33687d2b 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -411,7 +411,8 @@ static int nfs_readdir_search_for_pos(struct nfs_cache_array *array, static bool nfs_readdir_inode_mapping_valid(struct nfs_inode *nfsi) { - if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA)) + if (nfsi->cache_validity & (NFS_INO_INVALID_CHANGE | + NFS_INO_INVALID_DATA)) return false; smp_rmb(); return !test_bit(NFS_INO_INVALIDATING, &nfsi->flags); -- 2.31.1