summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2004-09-29 01:13:20 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-29 01:13:20 -0700
commit772a49b790bb76cd42c2073c7483e5703c9642c5 (patch)
tree1b343a3a4f6269e31abac4dba99ffeaeb8be386f /include/linux
parent02e55c81f8be9439b1ef1641433470f499ae226c (diff)
[PATCH] Fix disconnected dentries on NFS exports
A disconnected dentry can hold an inode active after the last link has been removed. The file will not then be truncated and removed until memory pressure flushes the disconnected dentry from the dcache. This problem can be resolved by making sure that an inode never has both a connected and a disconnected dentry. This is already the case for directories (as they must only have one dentry), but it is not the case for non-directories. This addresses it by: - changes d_alloc_anon to make sure that a new disconnected dentry is only allocated if there is currently no (hashed) dentry for the inode. (Previously this would noramlly be true, but a race was possible). - changes d_splice_alias to re-use a disconnected dentry on non-directories as well as directories. - splits most of d_find_alias out into a separate function to make the above easier. Problem originally reported by Nikita Danilov. Acked by Al Viro ("It looks sane"), and Jakob Oestergaard reports this fixes his problems. Further pushed by Christoph Hellwig. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions