]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
NFS: Only change the cookie verifier if the directory page cache is empty
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 17 Mar 2021 12:46:19 +0000 (08:46 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 09:07:11 +0000 (11:07 +0200)
commit087c672f29b7ddffe66fce3a08f605884e044058
treea65d007c1e003d4fde50858a1617897fec1c03a1
parent23257761882b4c2ef04928349a1472dd94993728
NFS: Only change the cookie verifier if the directory page cache is empty

BugLink: https://bugs.launchpad.net/bugs/1931292
[ Upstream commit f892c41c14e0fa3d78ce37de1d5c8161ed13bf08 ]

The cached NFSv3/v4 readdir cookies are associated with a verifier,
which is checked by the server on subsequent calls to readdir, and is
only expected to change when the cookies (and hence also the page cache
contents) are considered invalid.
We therefore do have to store the verifier, but only when the page cache
is empty.

Fixes: b593c09f83a2 ("NFS: Improve handling of directory verifiers")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/nfs/dir.c