Re: Linux 2.3.99pre4-5-ac1

From: Alexander Viro (viro@math.psu.edu)
Date: Mon Apr 10 2000 - 15:04:37 EST


On 10 Apr 2000, Michael Harnois wrote:

> On Mon, 10 Apr 2000 15:46:54 -0400 (EDT), Alexander Viro <viro@math.psu.edu> said:
>
> > Where would _audio driver_ (of all things) use that stuff?
>
> static struct dentry *snd_info_card_followlink(struct dentry *dentry,
> struct dentry *base,
> unsigned int follow)
> {
> snd_card_t *card;
> char tmp[16];
>
> down(&info_mutex);
> card = snd_info_find_card(dentry->d_inode->i_ino);
> if (card == NULL || card->proc_dir == NULL) {
> up(&info_mutex);
> return NULL;

        ... which is (and was) totally broken. Just what is intended here?
And BTW, what, it's YAFS?

> }
> strcpy(tmp, card->id);
> up(&info_mutex);
> return lookup_dentry(tmp, base, follow);
> }

_That_ one is easy -
static int snd_info_card_followlink(struct dentry *dentry, struct nameidata *nd)
{
[same stuff, modulo the bug above]
        return vfs_follow_link(tmp, nd);
}

-
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:14 EST