Re: [PATCH] minor update for autofs4 for 2.3.99-pre5

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Apr 13 2000 - 15:55:00 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:22 EST