Re: [PATCH] : Add dev-id and inode number for debugging in init_special_inode in fs/inode.c
From: Manish Katiyar
Date: Fri Apr 03 2009 - 06:35:55 EST
On Thu, Apr 2, 2009 at 3:20 AM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, 31 Mar 2009 08:11:00 +0530
> Manish Katiyar <mkatiyar@xxxxxxxxx> wrote:
>
> > --- a/fs/inode.c
> > +++ b/fs/inode.c
> > @@ -1540,7 +1540,8 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
> > else if (S_ISSOCK(mode))
> > inode->i_fop = &bad_sock_fops;
> > else
> > - printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o)\n",
> > - mode);
> > + printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
> > + " inode %s:%lu\n", mode, inode->i_sb->s_id,
> > + inode->i_ino);
> > }
>
> Is ther a guarantee that inode->i_sb and inode->i_ino have been initialised
> at this time?
Hi Andrew,
I checked the code and most of the places we are trying to access
inode->i_sb , inode->i_ino before this function call or after this,
without any checks. So looks like we will have the values at this
point of time.
Thanks -
Manish
--
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/