[RFC]fs/ramfs/inode.c

From: harryxiyou
Date: Fri Sep 30 2011 - 11:02:58 EST


Hi all,
When i read ramfs's inode file fs/ramfs/inode.c. I just see the following codes
and get some confusions.

[......]
static void ramfs_kill_sb(struct super_block *sb)
{
kfree(sb->s_fs_info);
kill_litter_super(sb);
}
[.....]

If we can really free the sb->s_fs_info successfully everytime? Ok, you may say
kfree returns no value. But how we can guarantee it can be freed
right. And The same
problem with the function kill_litter_super(sb). We also have some
other functions, which
i have the same confusions. I have searched the relevant codes about
kfree() with the tool
ctags and cscope, but i get so many relevant codes. I can not
distinguish which is the right
one. I think if we can not let the os stop, we just printk the
relevant error logs and make os
run as usual.


Thanks
Harry Wei
--
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/