NFSv4: Fix lookup revalidate of regular files
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 28 Sep 2018 16:42:51 +0000 (12:42 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:30:52 +0000 (09:30 +0200)
commit9e441c7844a6223e20105a9e4316079f7b26f15c
tree8f2e6c0c67a46ead349888c893aa31a55579866d
parent24acd93f59955956c1ae825ed7773f63ff5cbfdb
NFSv4: Fix lookup revalidate of regular files

commit c7944ebb9ce9461079659e9e6ec5baaf73724b3b upstream.

If we're revalidating an existing dentry in order to open a file, we need
to ensure that we check the directory has not changed before we optimise
away the lookup.

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