OSDN Git Service

NFS: Avoid duplicate uncached readdir calls on eof
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 19 Jan 2022 03:10:52 +0000 (22:10 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 2 Feb 2022 15:47:33 +0000 (10:47 -0500)
commite1d2699b96793d19388e302fa095e0da2c145701
tree7c9a296e49be8f754e853b702025a77f1e00a96a
parentce292d8faf41f62e0fb0c78476c6fce5d629235a
NFS: Avoid duplicate uncached readdir calls on eof

If we've reached the end of the directory, then cache that information
in the context so that we don't need to do an uncached readdir in order
to rediscover that fact.

Fixes: 794092c57f89 ("NFS: Do uncached readdir when we're seeking a cookie in an empty page cache")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c
include/linux/nfs_fs.h