diff mbox series

NFS: Don't skip directory entries when doing uncached readdir

Message ID 20220119005216.246686-1-trondmy@kernel.org (mailing list archive)
State New, archived
Headers show
Series NFS: Don't skip directory entries when doing uncached readdir | expand

Commit Message

Trond Myklebust Jan. 19, 2022, 12:52 a.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

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>
---
 fs/nfs/dir.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index cbf1a304ca18..07ad7095fffb 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1041,6 +1041,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;