From: "trondmy@kernel.org" <trondmy@kernel.org>
Date: Tue, 18 Jan 2022 19:52:16 -0500
Subject: [PATCH] NFS: Don't skip directory entries when doing uncached readdir
Git-commit: ce292d8faf41f62e0fb0c78476c6fce5d629235a
Patch-mainline: v5.17
References: git-fixes
Ensure that we initialise desc->cache_entry_index correctly in
uncached_readdir().
Fixes: d1bacf9eb2fd ("NFS: add readdir cache array")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Acked-by: NeilBrown <neilb@suse.com>
---
fs/nfs/dir.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1049,6 +1049,7 @@ static int uncached_readdir(struct nfs_r
goto out;
desc->page_index = 0;
+ desc->cache_entry_index = 0;
desc->last_cookie = desc->dir_cookie;
desc->duped = 0;