Skip to content

Commit

Permalink
NFS: Don't skip directory entries when doing uncached readdir
Browse files Browse the repository at this point in the history
[ Upstream commit ce292d8 ]

Ensure that we initialise desc->cache_entry_index correctly in
uncached_readdir().

Fixes: d1bacf9 ("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>
  • Loading branch information
trondmy@kernel.org authored and gregkh committed Feb 16, 2022
1 parent 98512f3 commit 77bfe65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 77bfe65

Please sign in to comment.