Revert "LINUX: do not use d_invalidate to evict dentries" 88/12788/5
authorMark Vitale <mvitale@sinenomine.net>
Thu, 30 Nov 2017 18:45:27 +0000 (13:45 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 1 Jan 2018 21:53:32 +0000 (16:53 -0500)
commit367693bd7da2de593e3329f6acc4a4d07621fb97
treefcffa6c15b2356294be0dc27fdcd3340c3df2d05
parentf8247078bd33a825d8734b2c8f05120d15ab3ffd
Revert "LINUX: do not use d_invalidate to evict dentries"

Linux recently changed the semantics of d_invalidate() to:
- return void
- invalidate even a current working directory

OpenAFS commit c3bbf0b4444db88192eea4580ac9e9ca3de0d286 switched libafs
to use d_prune_aliases() instead.

However, since that commit, several things have happened:
- RHEL 7.4 changed the semantics of d_invalidate() such that it
  invalidates the cwd, but did NOT change the return type to void.
  This broke our autoconf test for detecting the new semantics.
- Further research reveals that d_prune_aliases() was not the best
  choice for replacing d_invalidate().  This is because for directories,
  d_prune_aliases() doesn't invalidate dentries when they are referenced
  by its children, and it doesn't walk the tree trying to invalidate
  child dentries.  So it can leave dentries dangling, if the only
  references to thos dentries are via children.

In preparation for future commits, revert
c3bbf0b4444db88192eea4580ac9e9ca3de0d286 .

Change-Id: Iafbef23a6070180c0e21eb01a2d59385ef52f55c
Reviewed-on: https://gerrit.openafs.org/12788
Reviewed-by: Andrew Deason <adeason@dson.org>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/LINUX/osi_vcache.c