summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authortrondmy@kernel.org <trondmy@kernel.org>2022-01-19 03:52:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-16 14:56:24 +0300
commit3d2bc21a67681855e6a5906a20d4a09bd9b196cb (patch)
treedc0b99b9b131714cb9dcb42a870ed6fc1e9c9b94 /fs
parent557302faea9c8859ddbbc6cac2f17dcab75f44ab (diff)
downloadlinux-3d2bc21a67681855e6a5906a20d4a09bd9b196cb.tar.xz
NFS: Don't skip directory entries when doing uncached readdir
[ Upstream commit ce292d8faf41f62e0fb0c78476c6fce5d629235a ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index af7881bc6b3e..f6381c675cbe 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1049,6 +1049,7 @@ static int uncached_readdir(struct nfs_readdir_descriptor *desc)
goto out;
desc->page_index = 0;
+ desc->cache_entry_index = 0;
desc->last_cookie = desc->dir_cookie;
desc->duped = 0;