On Thu, 13 Apr 2000, H. Peter Anvin wrote:
>
> A positive dentry may not transition to negative, so if you have taken
> the dentry from positive to negative you have violated a dcache
> constraint.
>
> Linus: is this constraint still applicable?
Yes. You may never set dentry->d_inode to NULL after it has been filled,
unless you're the only user and you're freeing the dentry. The reason is
simple: the check for positivity happens only once, and after that a lot
of the code-paths know that the entry is positive. For example, "read()"
knows that it never has to check any of the pointers, because you can only
read() off an opened filehandle, and opening will check that the inode is
there and valid.
Linus