NFS: Fix dentry verifier races
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 29 Sep 2021 12:12:53 +0000 (08:12 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Oct 2021 00:49:07 +0000 (20:49 -0400)
commitcec08f452a687fce9dfdf47946d00a1d12a8bec5
tree449035ba957d3b01c14d3e77bd4b7f2a7fbe44ba
parentff81dfb5d721fff87bd516c558847f6effb70031
NFS: Fix dentry verifier races

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