]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
NFS: Fix dentry verifier races
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 29 Sep 2021 12:12:53 +0000 (08:12 -0400)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:33:27 +0000 (07:33 +0100)
commit0cdc9c1111402bc8c0aa16d70d8b57733b6d3df0
treee75eac1d3784855df390cc30b53833323ae76592
parent924719aa29f3925d49527f27b97f82e1f9b040c2
NFS: Fix dentry verifier races

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit cec08f452a687fce9dfdf47946d00a1d12a8bec5 ]

If the directory changed while we were revalidating the dentry, then
don't update the dentry verifier. There is no value in setting the
verifier to an older value, and we could end up overwriting a more up to
date verifier from a parallel revalidation.

Fixes: efeda80da38d ("NFSv4: Fix revalidation of dentries with delegations")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Tested-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/nfs/dir.c