Messages in this thread | | | Date | Fri, 30 Sep 2011 23:02:49 +0800 | Subject | [RFC]fs/ramfs/inode.c | From | harryxiyou <> |
| |
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
| |