Hmm.
Can you walk me through this?
If the dentry is unhashed, it means that it _either_
- has already been deleted (rmdir'ed) or d_invalidate()'d. Right?
I don't see why you should ever return the dentry in this case..
- or it has not yet been hashed at all
But then d_inode should be NULL too, no?
Anyway, as far as I can tell, you should handle the race between expiring
and re-mounting not by unhashing at expire time (which causes these kinds
of problems), but by setting a bit in the dentry and using the dentry
"revalidate()" callback to wait for the revalidate.
But I don't know autofs4, so you probably have some reason. Could you
explain it?
Linus
--