]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Don't revalidate the directory permissions on a lookup failure
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 8 Mar 2021 19:42:51 +0000 (14:42 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Mar 2021 20:48:02 +0000 (15:48 -0500)
commita80cfb52d79da0f05590c8e8867597e40abe05f2
tree828c065bd9e8576483dba415bca7e9fd7c5b9846
parent1f2191f781a3d180fb5a15e0a111aa9761fdc219
NFS: Don't revalidate the directory permissions on a lookup failure

There should be no reason to expect the directory permissions to change
just because the directory contents changed or a negative lookup timed
out. So let's avoid doing a full call to nfs_mark_for_revalidate() in
that case.
Furthermore, if this is a negative dentry, and we haven't actually done
a new lookup, then we have no reason yet to believe the directory has
changed at all. So let's remove the gratuitous directory inode
invalidation altogether when called from
nfs_lookup_revalidate_negative().

Reported-by: Geert Jansen <gerardu@amazon.com>
Fixes: 8cd49d646f86 ("NFS: Refactor nfs_lookup_revalidate()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c