]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:39 +0000 (10:29 +0200)
commit6ed6e777e6cae76c4db71d1bc399e6761d5d4cec
tree10f06f3025a647e79b41d117441515553e56d5cb
parent78214e7f6e71ac819a0671427ebf9b0e8eae0484
NFS: Only change the cookie verifier if the directory page cache is empty

[ 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>
fs/nfs/dir.c