]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Linux: Do drop dentry if lookup returns ENOENT
authorMarc Dionne <marc.dionne@your-file-system.com>
Wed, 19 Mar 2014 15:15:13 +0000 (11:15 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 26 Mar 2014 20:31:12 +0000 (13:31 -0700)
commit20217c278ef9ed554d4a53686fe867bca0007d3d
tree78e91f0b20aee16803129c2cc18f4383a0bf64e9
parenta23e76c6dcf0fc56df6d971bae2686003c6386fd
Linux: Do drop dentry if lookup returns ENOENT

Commit 997f7fce437787a45ae0584beaae43affbd37cce switched to using
d_invalidate instead of d_drop to prevent unhashing dentries
which are only temporarily invalid and may still be referenced
by someone having a current working directory pointing to it.
This could result in getting ENOENT from getcwd() after some
transient problems, even when the directory is there and
accessible.

The change had the side effect of potentially leaving something
visible when it has actually been removed, for instance a mountpoint
removed by "fs rm".

If afs_lookup returns ENOENT, we want to forcibly drop (unhash)
the dentry, even if it has current users.

Reviewed-on: http://gerrit.openafs.org/10928
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 389473032cf0b200c2c39fd5ace108bdc05c9d97)

Change-Id: Ifeda5a38a01bc136d3ecef01227ecd354da7cc3e
Reviewed-on: http://gerrit.openafs.org/10948
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_vnodeops.c