]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: Fix races between open and dentry revalidation
authorTrond Myklebust <trondmy@gmail.com>
Wed, 5 Feb 2020 14:01:53 +0000 (09:01 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 10 Feb 2020 15:50:59 +0000 (10:50 -0500)
commit328ae338a2df1a197ce6c4496e3387fcc20f8614
treed9ec3c8699f049af43388d671dde214138ed67df
parent05a28e65962fbc17c41714af56ec0085a5a43f9b
NFSv4: Fix races between open and dentry revalidation

We want to make sure that we revalidate the dentry if and only if
we've done an OPEN by filename.
In order to avoid races with remote changes to the directory on the
server, we want to save the verifier before calling OPEN. The exception
is if the server returned a delegation with our OPEN, as we then
know that the filename can't have changed on the server.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Benjamin Coddington <bcodding@gmail.com>
Tested-by: Benjamin Coddington <bcodding@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4file.c
fs/nfs/nfs4proc.c