xfs: fix double free of inode
authorDave Chinner <david@fromorbit.com>
Mon, 6 Apr 2009 16:40:17 +0000 (18:40 +0200)
committerChristoph Hellwig <hch@brick.lst.de>
Mon, 6 Apr 2009 16:40:17 +0000 (18:40 +0200)
If we fail to initialise the VFS inode in inode_init_always(),
it will call ->delete_inode internally resulting in the inode being
freed. Hence we need to delay the call to inode_init_always()
until after the XFS inode is sufficient set up to handle a
call to ->delete_inode, and then if that fails do not touch
the inode again at all as it has been freed.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>

No differences found