Re: [uml-devel] Re: [PATCH 11/12] HPPFS: add dentry_ops->d_revalidate

From: Blaisorblade
Date: Thu Oct 06 2005 - 14:07:41 EST


On Wednesday 21 September 2005 05:44, Al Viro wrote:
> On Sun, Sep 18, 2005 at 04:10:07PM +0200, Paolo 'Blaisorblade' Giarrusso
wrote:
> > +static int hppfs_d_revalidate(struct dentry * dentry, struct nameidata *
> > nd) +{
> > + int (*d_revalidate)(struct dentry *, struct nameidata *);
> > + struct dentry *proc_dentry;
> > +
> > + proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
> > + if (proc_dentry->d_op && proc_dentry->d_op->d_revalidate)
> > + d_revalidate = proc_dentry->d_op->d_revalidate;
> > + else
> > + return 1; /* "Still valid" code */
> > +
> > + return (*d_revalidate)(proc_dentry, nd);
> > +}
>
> Ahem... Guess what that will do with negative dentry?
Was missing the very first line (dentry->d_inode). I just saw you already
suggested returning 0 for them, which I'm gonna do anyway.

But, actually, procfs returns ENOENT (or EINVAL) rather than creating negative
dentries (at least, I've examined most of procfs lookup funcs, hope I haven't
missed any)...

And actually, after realizing the procfs trick, I see that we, too should miss
negative dentries, because on the "uncached" path when we get an error like
that we propagate that, and on the "cached" one obviously we can't find them
in dcache.
Right?

I'll do the check for negative dentries anyway because depending on procfs
details is not on my TODO list.

Yes, we could, but given the unmaintainance level of HPPFS, nobody would ever
fix it when needed, and that's not recommended.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade





___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/