From: trondmy@kernel.org Date: Wed, 19 Jan 2022 00:52:16 +0000 (-0500) Subject: NFS: Don't skip directory entries when doing uncached readdir X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ce292d8faf41f62e0fb0c78476c6fce5d629235a;p=linux.git NFS: Don't skip directory entries when doing uncached readdir Ensure that we initialise desc->cache_entry_index correctly in uncached_readdir(). Fixes: d1bacf9eb2fd ("NFS: add readdir cache array") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 43df0b365b981..a3de586d21e2b 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1042,6 +1042,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;