]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb351adca90b2e22338ef8c9b278b95242f53a2b0
tree84ec380710246cb3b97cd46ee57b3555d3afd07b
parent9d116a7e0846b5a24bed26727ac5afea670fec7e
xfs: fix double free of inode

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>
fs/xfs/xfs_iget.c