]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Fix dentry revalidation on NFSv4 lookup
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 27 Sep 2018 21:12:33 +0000 (17:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:31:59 +0000 (09:31 +0200)
commit0933aaa24890055cb8ee7afe1be8938f3dd62d85
treedbc66dd5c5d7f2f385cc174c18f0237a39029360
parent8cf9ddf9754c2a069ecac250b417f8bd328d1a11
NFS: Fix dentry revalidation on NFSv4 lookup

commit be189f7e7f03de35887e5a85ddcf39b91b5d7fc1 upstream.

We need to ensure that inode and dentry revalidation occurs correctly
on reopen of a file that is already open. Currently, we can end up
not revalidating either in the case of NFSv4.0, due to the 'cached open'
path.
Let's fix that by ensuring that we only do cached open for the special
cases of open recovery and delegation return.

Reported-by: Stan Hu <stanhu@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Qian Lu <luqia@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4proc.c