vfs: don't evict uninitialized inode
iput() ends up calling ->evict() on new inode, which is not yet initialized by owning fs. So use destroy_inode() instead. Add to sb->s_inodes list only if inode is not in I_CREATING state (meaning that it wasn't allocated with new_inode(), which already does the insertion). Reported-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com> Fixes: 80ea09a0 ("vfs: factor out inode_insert5()") Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Showing
想要评论请 注册 或 登录