Re: d_add on negative dentry?

From: Alexander Viro (viro@math.psu.edu)
Date: Mon Mar 05 2001 - 18:08:45 EST


On Tue, 6 Mar 2001, Urban Widmark wrote:

>
> Is it valid to call d_add on a negative dentry?
> (or on a dentry that is already linked in d_hash, but all negative
> dentries are, right?)

Not all of them. It _is_ legal to do d_add() on a negative dentry.
Doing that for hashed dentries is a bug. Use d_instantiate() instead.
                                                        Cheers,
                                                                Al

PS: as for the patch, better make it
        d_instantiate(...);
        if (!hashed)
                d_rehash(...);

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



This archive was generated by hypermail 2b29 : Wed Mar 07 2001 - 21:00:18 EST